Re: [fpc-pascal] What's the deal with CloseThread?

2013-04-23 Thread Anthony Walter
I was read this on MSDN: http://msdn.microsoft.com/en-us/library/windows/desktop/ms724211(v=vs.85).aspx "Closing a thread handle does not terminate the associated thread or remove the thread object. Closing a process handle does not terminate the associated process or remove the process object. T

Re: [fpc-pascal] What's the deal with CloseThread?

2013-04-23 Thread Anthony Walter
Thanks for so much Sven. I have another question. Is it okay for a thread to close itself before it's finished? Because I believe that is what happens when FreeOnTerminate is set to True. Here is a brief synopsis of what can execute: In rtl/objpas/classes/classes.inc Line 168: FreeThread := Thre

Re: [fpc-pascal] Statically link library

2013-04-23 Thread Darius Blaszyk
On Apr 21, 2013, at 6:35 PM, Ludo Brands wrote: > A few things wrong in your files: > - the c program. When you want to link against msvcrt then you better > use the ms functions;) There is no filesize, or open, or close (the > latter are deprecated since a while and not present anymore in msvcrt

Re: [fpc-pascal] What's the deal with CloseThread?

2013-04-23 Thread Sven Barth
On 23.04.2013 21:40, Sven Barth wrote: On 23.04.2013 16:28, Anthony Walter wrote: That is, it is okay to call BeginThread and never call CloseThread? Because that is how TThread currently works, and is in contradiction to the documentation. And no one bothers to read my answer :( Again: The o

[fpc-pascal] RAD Studio XE4 Released?

2013-04-23 Thread vfclists .
http://www.h-online.com/developer/news/item/RAD-Studio-XE4-focuses-on-cross-platform-apps-1848176.html http://www.embarcadero.com/press-releases/embarcadero-technologies-unveils-multi-device-true-native-app-development-suite -- Frank Church === http://devblog.brahmancreations

Re: [fpc-pascal] What's the deal with CloseThread?

2013-04-23 Thread Sven Barth
On 23.04.2013 16:28, Anthony Walter wrote: That is, it is okay to call BeginThread and never call CloseThread? Because that is how TThread currently works, and is in contradiction to the documentation. And no one bothers to read my answer :( Again: The only RTL that currently(!) does something

Re: [fpc-pascal] What's the deal with CloseThread?

2013-04-23 Thread Anthony Walter
Okay, thanks for the replies. I'll stick with what I have know, which is to use BeginThread, EndThread, CloseThread. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] What's the deal with CloseThread?

2013-04-23 Thread Marco van de Voort
In our previous episode, Anthony Walter said: > That is, it is okay to call BeginThread and never call CloseThread? Because > that is how TThread currently works, and is in contradiction to the > documentation. If you want split hairs: It is ok for tthread, since as in tree code it can legally us

Re: [fpc-pascal] What's the deal with CloseThread?

2013-04-23 Thread Anthony Walter
On Tue, Apr 23, 2013 at 9:22 AM, Marco van de Voort wrote: > The TThread code was never specified in terms of the procedural api. As > said > the procedural api largely came after tthread was stable. > > Probably at some point calls to the threadmanager were substituted with > calls to beginthrea

Re: [fpc-pascal] Object Pascal Grammar in EBNF like style

2013-04-23 Thread Kenneth Cochran
Just curious how your efforts turned out? On Fri, Mar 22, 2013 at 9:59 AM, Graeme Geldenhuys wrote: > On 2013-03-22 13:29, Michael Van Canneyt wrote: > > > > That looks dangerously much, almost verbatim, like the appendix A of the > > Delphi language guide as found in the D7 manual. > > Umm, I d

Re: [fpc-pascal] What's the deal with CloseThread?

2013-04-23 Thread Marco van de Voort
In our previous episode, Anthony Walter said: > > True. But that only means that the beginthread interface is relatively > > little used because everybody uses tthread. > > But on i386-linux TThread does use BeginThread and never calls CloseThread. > So that seems contrary to the rule we are discu

Re: [fpc-pascal] What's the deal with CloseThread?

2013-04-23 Thread Anthony Walter
On Tue, Apr 23, 2013 at 7:13 AM, Marco van de Voort wrote: > True. But that only means that the beginthread interface is relatively > little used because everybody uses tthread. But on i386-linux TThread does use BeginThread and never calls CloseThread. So that seems contrary to the rule we are

Re: [fpc-pascal] What's the deal with CloseThread?

2013-04-23 Thread Marco van de Voort
In our previous episode, Anthony Walter said: > I get your point about Windows + CloseHandle > > But I'm still confused with regards to every other platform. You say yes, > affirming the documentation ... that CloseThread must be called ... nowhere > in any of the platform code I've search is Clos

Re: [fpc-pascal] What's the deal with CloseThread?

2013-04-23 Thread Sven Barth
Am 23.04.2013 09:56, schrieb Anthony Walter: I get your point about Windows + CloseHandle But I'm still confused with regards to every other platform. You say yes, affirming the documentation ... that CloseThread must be called ... nowhere in any of the platform code I've search is CloseThread

Re: [fpc-pascal] What's the deal with CloseThread?

2013-04-23 Thread Anthony Walter
I get your point about Windows + CloseHandle But I'm still confused with regards to every other platform. You say yes, affirming the documentation ... that CloseThread must be called ... nowhere in any of the platform code I've search is CloseThread used, ever. (even though BeginThread is used) __

Re: [fpc-pascal] What's the deal with CloseThread?

2013-04-23 Thread Marco van de Voort
In our previous episode, Anthony Walter said: > I was looking at threading support in the System unit and also in the > TThread class. > > According to the documentation at > http://www.freepascal.org/docs-html/rtl/system/closethread.html > > CloseThread must be called on any thread started with