| |
|
|
- Page 1 - |
|
p.specht
| thread.is supply lt. xpse-Page momentarily always zero. gives it Notes, Why the so is? In Java, too interpretierend, shining the suitable commands thread.isalive To functions. where could I or someone Berufenerer set? |
|
|
| Computer: Gerät, daß es in Mikrosekunden erlaubt, 50.000 Fehler zu machen, zB 'daß' statt 'das'... | 11/30/18 ▲ |
|
|
|
|
« this Posting watts as Solution marked. » |
|
| Tjo, there have I well Mist built.
Please time this Workaround standing:
|
|
|
| |
|
|
|
|
p.specht
| JAU works - thanks iF!
{$cleqt}
Windowstyle 24
cls rgb(255,200,200)
nProc thread.is2(long thread)
long cs=criticalsection.begin(st(thread))
thread=long(thread,36)
criticalsection.end(cs)
return thread
endProc
var edit& =@Create("Edit",%Hwnd,"1",40,20, 140,20)
var edit2&=@Create("Edit",%Hwnd,"2",40,50, 140,20)
var edit3&=@Create("Edit",%Hwnd,"3",40,80, 140,20)
var thread& =thread.start(procaddr(meinThread), edit&, "1000")
var thread2&=thread.start(procaddr(meinZweiterThread), edit2&, "2000")
var thread3&=thread.start(procaddr(meinDritterThread), edit3&, "3000")
var n&=0
font 2
locate 15,1
Print " Theads go the row to exits through ESC-Button!"
Print "\n Hauptprogramm now in Hauptschleife!"
repeat
locate 23,23:print n&:inc n&
Window Title st$(n&)
waitinput 100
until (%key=27) or (%key=2)
print "\n Hauptschleife watts leave."
waitinput 1500
thread.stop(thread&)
::::::::::::::::::::::::::::::print thread.is2(thread&),
while thread.is2(thread&)
endwhile
:::::::::::::::::::::::::::::print thread.is2(thread&)
thread.close(thread&)
print "\n have Thread Nr. 1 exits."
waitinput 1500
thread.stop(thread2&)
while thread.is2(thread2&)
endwhile
thread.close(thread2&)
print " have Thread Nr. 2 exits."
waitinput 1500
thread.stop(thread3&)
while thread.is2(thread3&)
endwhile
thread.close(thread3&)
print " have Thread Nr. 3 exits."
waitinput 1500
beep
print "\n here Hauptprogramm: Isch 'abe feddisch... BYEBYE!"
waitinput 3000
END
nproc meinThread :parameters thread&,dataLong&,dataString$
whilenot thread.message(thread&)==wm_close
settext(dataLong&,"["+time$(0)+"."+substr$(time$(1),1,".")+"]")
sleep(1000)
endwhile
return 0
endproc
nproc meinZweiterThread :parameters thread2&,dataLong2&,dataString2$
whilenot thread.message(thread2&)==wm_close
settext(dataLong2&, "("+time$(1)+"."+substr$(time$(0),1,".")+")")
sleep(1333)
endwhile
return 0
endproc
nproc meinDritterThread :parameters thread3&,dataLong3&,dataString3$
whilenot thread.message(thread3&)==wm_close
settext(dataLong3&, "{"+time$(0)+"."+substr$(time$(1),1,".")+"}")
sleep(3000)
endwhile
return 0
endproc
|
|
|
| Computer: Gerät, daß es in Mikrosekunden erlaubt, 50.000 Fehler zu machen, zB 'daß' statt 'das'... | 12/05/18 ▲ |
|
|
|
|
| everything clear,
becomes in the next XPSE-Update (whenever the attend likes) then too include his - habs Topic time angepinnt. |
|
|
| |
|
|