Help me please fix the bug

Majestio majestio at ya.ru
Fri May 18 09:35:28 UTC 2018


On Friday, 18 May 2018 at 07:28:39 UTC, Mike Franklin wrote:
> On Friday, 18 May 2018 at 05:44:12 UTC, Majestio wrote:
>
>>     this()
>>     @safe nothrow {
>>         m_queue = () @trusted { return kqueue(); } ();
>>         m_events.length = 100;
>>         assert(m_queue >= 0, "Failed to create kqueue.");
>>     }
>>
>
>
> Also, I believe this is __lambda1:
>
> m_queue = () @trusted { return kqueue(); } ();
>
> Is `kqueue()` nothrow?  You probably need to decorate that 
> lambda with `nothrow`.  (i.e. put a `nothrow` right after 
> `@trusted`.
>
> Mike

`kqueue()` is not nothrow. From log: "Error: function 
'core.sys.freebsd.sys.event.kqueue' is not nothrow"

This decoration does not solve the problem :(



More information about the Digitalmars-d mailing list