On Tue, 07 May 2013 00:03:58 +0100, Sean Kelly
wrote:
On May 2, 2013, at 6:17 AM, Regan Heath wrote:
On Wed, 01 May 2013 01:12:39 +0100, Sean Kelly
wrote:
On Apr 23, 2013, at 2:21 PM, Jack Applegame
wrote:
According WinAPI documentation, CtrlHandler will be called in new
additio
On May 2, 2013, at 6:17 AM, Regan Heath wrote:
> On Wed, 01 May 2013 01:12:39 +0100, Sean Kelly wrote:
>
>> On Apr 23, 2013, at 2:21 PM, Jack Applegame wrote:
>>>
>>> According WinAPI documentation, CtrlHandler will be called in new
>>> additional thread. Is it safe to allocate GC memory in
On Wed, 01 May 2013 01:12:39 +0100, Sean Kelly
wrote:
On Apr 23, 2013, at 2:21 PM, Jack Applegame wrote:
According WinAPI documentation, CtrlHandler will be called in new
additional thread. Is it safe to allocate GC memory in NOT Phobos
threads?
If not, how to make it safe? I'm trying
On Apr 23, 2013, at 2:21 PM, Jack Applegame wrote:
>
> According WinAPI documentation, CtrlHandler will be called in new additional
> thread. Is it safe to allocate GC memory in NOT Phobos threads?
> If not, how to make it safe? I'm trying call thread_attachThis() at the
> beginning of CtrlHand
On Wednesday, 24 April 2013 at 09:51:29 UTC, Regan Heath wrote:
Until then, I would perform manual memory allocation. I am not
sure how in D, but you need something like "placement new" to
construct a class in a previously allocated block of memory
(allocated with malloc or similar).
look at
On Tue, 23 Apr 2013 22:21:27 +0100, Jack Applegame
wrote:
I'm writing Ctrl-C handler for console application for Windows:
extern(Windows) {
int CtrlHandler(uint flag) nothrow {
auto tmp = new SomeClass; // is it safe?
...
return true;
}
}
...
SetConsoleCtrlHandler(&Ctr
On Tuesday, 23 April 2013 at 21:21:28 UTC, Jack Applegame wrote:
If not, how to make it safe? I'm trying call
thread_attachThis() at the beginning of CtrlHandler fucntion,
but it doesn't compile because thread_attachThis() is not
nothrow.
what stops you from calling normal functions in nothr
On Tuesday, 23 April 2013 at 21:21:28 UTC, Jack Applegame wrote:
I'm writing Ctrl-C handler for console application for Windows:
extern(Windows) {
int CtrlHandler(uint flag) nothrow {
auto tmp = new SomeClass; // is it safe?
...
return true;
}
}
...
SetConsoleCtrlHandler(&CtrlH
I'm writing Ctrl-C handler for console application for Windows:
extern(Windows) {
int CtrlHandler(uint flag) nothrow {
auto tmp = new SomeClass; // is it safe?
...
return true;
}
}
...
SetConsoleCtrlHandler(&CtrlHandler, true);
...
According WinAPI documentation, CtrlHandler w