Re: Best practices for multithread global flags

2017-11-15 Thread Vladimirs Nordholm via Digitalmars-d-learn
On Wednesday, 15 November 2017 at 11:57:25 UTC, Vladimirs Nordholm wrote: Hello people from D-land. To summarise my problem: I have a program in the terminal (Posix) with two threads: one which my main program is run on, and a second one which polls input via `poll(...)` and `read(...)`.

Re: Best practices for multithread global flags

2017-11-15 Thread Guillaume Piolat via Digitalmars-d-learn
On Wednesday, 15 November 2017 at 11:57:25 UTC, Vladimirs Nordholm wrote: Hello people from D-land. To summarise my problem: I have a program in the terminal (Posix) with two threads: one which my main program is run on, and a second one which polls input via `poll(...)` and `read(...)`.

Re: Best practices for multithread global flags

2017-11-15 Thread Jonathan M Davis via Digitalmars-d-learn
On Wednesday, November 15, 2017 11:57:25 Vladimirs Nordholm via Digitalmars- d-learn wrote: > Hello people from D-land. > > To summarise my problem: I have a program in the terminal (Posix) > with two threads: one which my main program is run on, and a > second one which polls input via

Re: Best practices for multithread global flags

2017-11-15 Thread rikki cattermole via Digitalmars-d-learn
On 15/11/2017 11:57 AM, Vladimirs Nordholm wrote: Hello people from D-land. To summarise my problem: I have a program in the terminal (Posix) with two threads: one which my main program is run on, and a second one which polls input via `poll(...)` and `read(...)`. Let's call main thread T1,

Best practices for multithread global flags

2017-11-15 Thread Vladimirs Nordholm via Digitalmars-d-learn
Hello people from D-land. To summarise my problem: I have a program in the terminal (Posix) with two threads: one which my main program is run on, and a second one which polls input via `poll(...)` and `read(...)`. Let's call main thread T1, and a semi-blocking input-thread T2. Every second