- gban: Ingyen kellene, de tegnapra
- ubyegon2: Airfryer XL XXL forrólevegős sütő gyakorlati tanácsok, ötletek, receptek
- weiss: Pant* rant
- Bezzeg annak idején...
- leslieke: leslieke farmerzsebe
- D1Rect: Nagy "hülyétkapokazapróktól" topik
- sziku69: Szólánc.
- Luck Dragon: Asszociációs játék. :)
- sziku69: Fűzzük össze a szavakat :)
- GoodSpeed: Samsung Galaxy S24 FE - tapasztalatok
Új hozzászólás Aktív témák
-
btotyi
tag
Például így :
package test;
class Szal extends java.lang.Thread {
volatile static boolean Stop = false;
// Primordial thread executes main()
public static void main(String args[]) throws InterruptedException {
// Create and start 2 threads
Szal thread1 = new Szal();
thread1.setPriority(1); // 1st thread at 1th non-RT priority
Szal thread2 = new Szal();
thread2.setPriority(1); // 2nd thread at 1th non-RT priority
thread1.start(); // start 1st thread to execute run()
thread2.start(); // start 2nd thread to execute run()
// Sleep for 10 seconds, then tell the threads to terminate
Thread.sleep(10 * 1000);
Stop = true;
}
public void run() { // Created threads execute this method
System.out.println(''Created thread'');
int count = 0;
for (; Stop != true;) { // continue until asked to stop
count++;
Thread.yield(); // yield to other thread
}
System.out.println(''Thread terminates. Loop count is '' + count);
}
}
forrás:[link]
Új hozzászólás Aktív témák
A topicot kiemeltem. Valaki nem akar egy nyitó hsz-t írni?:))
- ASUS TUF Gaming A620M-Plus + AMD Ryzen 5 8400F + 16GB 5600MHz Kingston Fury Beast + hűtő
- Eladó Erős Gamer PC - Akár Cyberpunk 2077-re Is Készen! (Ryzen 3 2200G RX 570 8GB 32GB RAM AIO
- MacBook Pro 2019 '16 2,6 Ghz 6mag Intel Core i7 16/512gb - Space Gray Touch Bar
- Xiaomi 13T 256GB, Kártyafüggetlen, 1 Év Garanciával
- Honor Magic6 Lite 256GB, Kártyafüggetlen, 1 Év Garanciával
- Azonnali készpénzes Apple Macbook Air felvásárlás személyesen / csomagküldéssel korrekt áron
- Csere-Beszámítás! Asus Rog Thor II 1200W 80+ Platinum tápegység! Olvass!
- Bomba ár! Dell Precision M4800 i7-4800MQ I 16GB I 256SSD I 15,6" FHD I K1100M I Cam I W10 I Gari!
- Honor 400 Lite 256GB, Kártyafüggetlen, 1 Év Garanciával
- LG 55G2 - 55" OLED evo - 4K 120Hz 1ms - 1100 Nits - NVIDIA G-Sync - FreeSync Premium - HDMI 2.1
Állásajánlatok
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest