[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4505: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4507: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4508: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4509: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
SloGameDev.net • Poglej temo - ukinjanje thread-a

ukinjanje thread-a

Za vse novince v izdelovanju iger.

ukinjanje thread-a

OdgovorNapisal/-a newbe » Ne Sep 20, 2015 2:44 pm

newbe
novinec
novinec
 
Prispevkov: 5
Pridružen: Ne Sep 20, 2015 2:28 pm

Re: ukinjanje thread-a

OdgovorNapisal/-a errorage » So Sep 26, 2015 11:50 pm

errorage
novinec
novinec
 
Prispevkov: 16
Pridružen: Če Mar 10, 2011 2:43 pm

Re: ukinjanje thread-a

OdgovorNapisal/-a newbe » Ne Sep 27, 2015 8:41 pm

Hvala za odgovor!
Upam, da mi uspe čim prej preoblikovati kodo, pa sporočim uspešnost :-)

lp Rok
newbe
novinec
novinec
 
Prispevkov: 5
Pridružen: Ne Sep 20, 2015 2:28 pm

Re: ukinjanje thread-a

OdgovorNapisal/-a newbe » So Okt 03, 2015 8:52 am

newbe
novinec
novinec
 
Prispevkov: 5
Pridružen: Ne Sep 20, 2015 2:28 pm

Re: ukinjanje thread-a

OdgovorNapisal/-a errorage » Po Okt 05, 2015 9:36 pm

Koda, ki sem jo postal je bila zgolj pseudokoda za rašiti težavo ustavitve threada. V Javo moraš prevesti sam.

Za Thrd si poglej sledeče:
https://docs.oracle.com/javase/tutorial ... hread.html

To ti pokaže kako kreiraš nov thread in ga zaženeš - V tem primeru sta Thrd in Ext isti razred, ko to prirediš v svojo kodo boš moral v Thrd extendat Thread in implementirat Run metodo kot v linkanem primeru, v Run metodo vključiš kodo iz mojega primera, sam thread pa začneš v Ext razredu.

Thread torej začneš v Ext -> main() tako:
(new Thrd()).start();

public class Thrd{ ... }
bo moral extendat Thread, torej:
public class Thrd extends Thread{ ... }

in v Thrd moraš implementirat run metood:
public void run() { ... }

Ostalo je v mojem prejšnjem postu.
errorage
novinec
novinec
 
Prispevkov: 16
Pridružen: Če Mar 10, 2011 2:43 pm

Re: ukinjanje thread-a

OdgovorNapisal/-a newbe » Če Okt 08, 2015 9:14 pm

thx

upam, da mi uspe sprobat čez vikend

lp Rok
newbe
novinec
novinec
 
Prispevkov: 5
Pridružen: Ne Sep 20, 2015 2:28 pm

Re: ukinjanje thread-a

OdgovorNapisal/-a newbe » So Okt 17, 2015 10:24 pm

newbe
novinec
novinec
 
Prispevkov: 5
Pridružen: Ne Sep 20, 2015 2:28 pm


Vrni se na Začetniki

Kdo je na strani

Po forumu brska: 0 registriranih uporabnikov in 1 gost

cron