| |
|
|
p.specht
| question: gives it there not Speicherlecks, if with the Closing-Cross aborted becomes instead of with ESC-Button?
{$cleq}
cls
var n&=0
Print " Theads the row to with stop ESC-Button!"
var thread&=thread.start(procaddr(meinThread),0,"")
var thread2&=thread.start(procaddr(meinZweiterThread),0,"")
repeat
locate 10,10:print n&:inc n&;
waitinput 5
until %key=27
print "\n have Hauptschleife leave."
waitinput
thread.stop(thread&)
while thread.is(thread&)
endwhile
thread.close(thread&)
print " have Thread Nr. 1 exits."
waitinput
thread.stop(thread2&)
while thread.is(thread2&)
endwhile
thread.close(thread2&)
print " have Thread Nr. 2 exits."
print " Isch 'abe feddisch..."
waitinput 3000
end
nproc meinThread :parameters thread&,dataLong&,dataString$
whilenot thread.message(thread&)==wm_close
settext(%hWnd,"Mein FensterTitel - ["+time$(0)+"."+substr$(time$(1),1,".")+"]")
sleep(1000)
endwhile
return 0
endproc
nproc meinZweiterThread :parameters thread&,dataLong&,dataString$
whilenot thread.message(thread&)==wm_close
settext(%hWnd,"MEIN FENSTERTI - ("+time$(0)+"."+substr$(time$(1),1,".")+")")
sleep(900)
endwhile
return 0
endproc
|
|
|
| XProfan 11Computer: Gerät, daß es in Mikrosekunden erlaubt, 50.000 Fehler zu machen, zB 'daß' statt 'das'... | 03/13/14 ▲ |
|
|
|
|
Nico Madysa | Hello Peter,
I have me The freedom taken, your code from Lesbarkeitsgründen in [code]-Blöcke To settle. thereby have so did i a couple Doppelpunkte from your View source against Zeilenumbrüche swapped, because tappt im dunkeln whom seiteninternen Einrückungsparser confusion brought having.
what your question angeht, so have I earnest doubt, that there one Speicherleck existing. If you whom Closing-button press, becomes the XProfan-Window with DestroyWindow destroy and at end the Prozesses should too any Threads the Prozesses to that Erliegen come.
the are but everything only guesses. If you it very know want, can you Yes in a Loop the program a couple thousand time Call and it then one WM_CLOSE zukommen let, or. DestroyWindow on it utilize.
If itself not in the RAM-course your Taskmanagers noticeable power, is the thing probably sure. |
|
|
| |
|
|
|
p.specht
| thanks for rapid response, Nico! be on the testing...
The question related on these Note in the xpse-Funktionshilfe, wonach The function tread.is() fälschlicherweise always zero supply - otherwise could the Hauptprogramm remember and to wait it out, if yet Threads werken. knows there someone a work-around? greeting
P.s.: with 'Mutex' to Synchronisation must I too first keep busy. a benefit to Polling see I presently sooner not. whom there apparently only Problemarten, The me bislang not yet untergekommen are. |
|
|
| Computer: Gerät, daß es in Mikrosekunden erlaubt, 50.000 Fehler zu machen, zB 'daß' statt 'das'... | 03/17/14 ▲ |
|
|
|
|
Nico Madysa | If you no high Geschwindigkeiten need, would one Workaround, XProfan-Multiprozessing To use. this is slower, functions but at least. next alternative would, with PExec a new Process to start, in the but against a Nproc aufzurufen. this is ugly, but the are Workarounds Yes usually. |
|
|
| |
|
|
|
| p.woodpecker (13.03.14)
question: gives it there not Speicherlecks, if with the Closing-Cross aborted becomes instead of with ESC-Button?
windows säubert (at least ex I faith) Version XP anyhow with Prozessende.
the Program had but Race-Condition-Problems if the Thread runs and hWnd talking without that it hWnd gives. Müsstest the good Order halber means to destruction the hWnd The Threads tidy terminate. accordingly becomes Window Style 512 well unavoidably. |
|
|
| |
|
|