Thread overview |
---|
May 28, 2010 CreateThread? | ||||
---|---|---|---|---|
| ||||
I create win32 application. (use dmd 2.046) Exist object Thread in std.thread. Object Thread gives support for garbage collector, but I want to use the function CreateThread. Can I create threads with this function? |
May 28, 2010 Re: CreateThread? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Pavel | Pavel Wrote:
> I create win32 application. (use dmd 2.046)
> Exist object Thread in std.thread. Object Thread gives support for garbage
> collector, but I want to use
> the function CreateThread.
> Can I create threads with this function?
Yes, you can. You just shouldn't use data allocated in D heap. And may be TLS.
|
May 28, 2010 Re: CreateThread? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Pavel | Hello Pavel, > I create win32 application. (use dmd 2.046) > Exist object Thread in std.thread. Object Thread gives support for > garbage > collector, but I want to use > the function CreateThread. > Can I create threads with this function? You can call it (you can call any C function). It should give you a new thread. It might break something else in D (for example: the GC pauses all threads for a collection and that might break) Why do you want to use CreateThread? -- ... <IXOYE>< |
May 31, 2010 Re: CreateThread? | ||||
---|---|---|---|---|
| ||||
Posted in reply to BCS | I need call WaitForMultipleObject for thread and event handle. Object Thread in std.thread hide the handle, but create support for GC. Do you GC pause this my thread? (use dmd 2.046) (This thread is not in the global list of threads) How can I do to support my threads for GC?? Pavel |
Copyright © 1999-2021 by the D Language Foundation