On Wednesday, 23 September 2020 at 20:58:00 UTC, Imperatorn wrote:
On Wednesday, 23 September 2020 at 20:54:51 UTC, Imperatorn
wrote:
On Wednesday, 23 September 2020 at 20:44:51 UTC, Ali Çehreli
wrote:
On 9/23/20 1:19 PM, Imperatorn wrote:
> [...]
send a
> [...]
with timeout.
[...]
Sorry, I
On Wednesday, 23 September 2020 at 20:54:51 UTC, Imperatorn wrote:
On Wednesday, 23 September 2020 at 20:44:51 UTC, Ali Çehreli
wrote:
On 9/23/20 1:19 PM, Imperatorn wrote:
> [...]
send a
> [...]
with timeout.
[...]
Sorry, I can't see the problem. Could you be more specific
about what you w
On Wednesday, 23 September 2020 at 20:44:51 UTC, Ali Çehreli
wrote:
On 9/23/20 1:19 PM, Imperatorn wrote:
> [...]
send a
> [...]
with timeout.
[...]
Sorry, I can't see the problem. Could you be more specific about
what you want to achieve?
On 9/23/20 1:19 PM, Imperatorn wrote:
> No. You should not share anything. Personally I would just send a
> message to request termination or use the solution provided with timeout.
std.concurrency does not allow "mutable thread-local data"; so one needs
to cast to shared (assuming copying is n
On Wednesday, 23 September 2020 at 17:33:50 UTC, drathier wrote:
On Tuesday, 22 September 2020 at 21:55:51 UTC, Imperatorn wrote:
[...]
Blocking is perfectly fine. I'm wondering if I need things to
be shared now or something? Not used to programming with
threads. Adding a shared modifier rec
On Tuesday, 22 September 2020 at 21:55:51 UTC, Imperatorn wrote:
On Tuesday, 22 September 2020 at 09:32:13 UTC, drathier wrote:
What's the obvious way to put a timeout around a function
call? I'm thinking a 5 or 30 second timeout, and I'm expecting
it to pretty much never time out.
You have s
On Tuesday, 22 September 2020 at 09:32:13 UTC, drathier wrote:
What's the obvious way to put a timeout around a function call?
I'm thinking a 5 or 30 second timeout, and I'm expecting it to
pretty much never time out.
You have several options. Either you use the actor model
(spawn[Linked]) an
On 9/22/20 2:32 AM, drathier wrote:> What's the obvious way to put a
timeout around a function call? I'm
> thinking a 5 or 30 second timeout, and I'm expecting it to pretty much
> never time out.
I would start a thread and use receiveTimeout():
import std.concurrency;
import std.stdio;
import s