Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #13404
| Newsgroups | comp.lang.clipper.visual-objects |
|---|---|
| Date | 2021-08-03 03:56 -0700 |
| Message-ID | <29915aac-da35-4455-b403-c1fec00692e3n@googlegroups.com> (permalink) |
| Subject | CreateThread vs. CreateVOThread |
| From | Robert Pope <cooeee@gmail.com> |
Hi All. I'm wondering if anyone knows what the differences between Win32 API CreateThread() vs. VO's CreateVOThread() are? Mostly with relation to the garbage collector. I.e. if I use Win32 API's CreateThread() would I completely avoid the garbage collector running on my thread. Is there a reason why I would still be better off using CreateVOThread()? I understand that threads and dynamic memory / the garbage collector don't play well together. I have in my ThreadFunc avoided declaring any LOCAL's and avoided calling any VO functions (because they might also have LOCAL's). There are also no anonymous variables like a string concatenation. Where I can't avoid a variable I use a structure (ThreadData) in static memory. The thread is the only reader/writer to this structure. Assuming I haven't missed anything, my thread is only working in static memory and only calling Windows API functions. The thread itself is pretty simple. It calls Win32 API IsHungAppWindow() once per second and logs an event in the windows event log if that function returns true. I'm not sure how much I trust VO's threading (or my code not to have missed some dynamic memory allocation somewhere) so I've also included runtime options to completely disable this feature if it plays up. Cheers! Rob.
Back to comp.lang.clipper.visual-objects | Previous | Next — Next in thread | Find similar | Unroll thread
CreateThread vs. CreateVOThread Robert Pope <cooeee@gmail.com> - 2021-08-03 03:56 -0700
Re: CreateThread vs. CreateVOThread Jamal <nospam@example.com> - 2021-08-03 12:05 -0400
Re: CreateThread vs. CreateVOThread Robert Pope <cooeee@gmail.com> - 2021-08-03 10:07 -0700
Re: CreateThread vs. CreateVOThread Jamal <nospam@example.com> - 2021-08-03 18:02 -0400
Re: CreateThread vs. CreateVOThread dlzc <dlzc1@cox.net> - 2021-08-04 07:32 -0700
Re: CreateThread vs. CreateVOThread "Wolfgang Riedmann" <wriedmann@gmail.com> - 2021-08-04 17:07 +0200
Re: CreateThread vs. CreateVOThread Robert Pope <cooeee@gmail.com> - 2021-08-04 10:18 -0700
Re: CreateThread vs. CreateVOThread "Wolfgang Riedmann" <wriedmann@gmail.com> - 2021-08-05 11:47 +0200
csiph-web