On Thursday, 2 December 2021 at 23:29:17 UTC, Chris Katko wrote:
Is there a D std.library accessible version of POSIX
sched_yield:
https://man7.org/linux/man-pages/man2/sched_yield.2.html
D bindings for POSIX headers are provided by modules in the
package `core.sys.posix`. So, for
On Thursday, 2 December 2021 at 23:29:17 UTC, Chris Katko wrote:
there's:
```d
import core.thread;
Thread.sleep( dur!("msecs")(10) );
```
but what if you want to simply yield all remaining time back to
the time scheduler?
Is there a D std.library accessible version of POSIX
On Thu, Dec 02, 2021 at 11:29:17PM +, Chris Katko via Digitalmars-d-learn
wrote:
[...]
> It seems I can (thanks to the amazing work of D community) simply do:
>
> ```d
> extern(C) int sched_yield(void); // #include
> ```
>
> however, how does the linker know I need and not some local
>
there's:
```d
import core.thread;
Thread.sleep( dur!("msecs")(10) );
```
but what if you want to simply yield all remaining time back to
the time scheduler?
Is there a D std.library accessible version of POSIX sched_yield:
https://man7.org/linux/man-pages/man2/sched_yield.2.html
It