On Monday, 29 July 2013 at 16:19:03 UTC, lindenk wrote:
void foo(Tid parent) {
bool run = true;
while(run)
{
//do_some_blocking_function();
receiveTimeout(dur!"msecs"(0),
(string s){if(s == "STAHP!") run = false;}
);
}
// clean up
send(parent
On Monday, 29 July 2013 at 17:26:55 UTC, Sean Kelly wrote:
On Jul 29, 2013, at 10:07 AM, lindenk
wrote:
After a bit more research it looks like everyone else uses -
while(checkIfRunning())
{
// block with timeout
}
which leads me to believe this might not be possible or
standard. Althou
On Jul 29, 2013, at 10:07 AM, lindenk wrote:
> After a bit more research it looks like everyone else uses -
>
> while(checkIfRunning())
> {
>// block with timeout
> }
>
> which leads me to believe this might not be possible or standard. Although,
> should something along the lines of this
On Jul 29, 2013, at 8:28 AM, lindenk wrote:
>
> Ah, no I mean, what if do_some_blocking_function blocks for some
> indeterminate amount of time. I would like it to exit even when it is
> currently blocking (as it could be unpredictable when it will stop blocking).
Execute the blocking function
After a bit more research it looks like everyone else uses -
while(checkIfRunning())
{
// block with timeout
}
which leads me to believe this might not be possible or standard.
Although, should something along the lines of this be possible?
Process p = new Process();
p.doTask(p.func()); /
void foo(Tid parent) {
bool run = true;
while(run)
{
//do_some_blocking_function();
receiveTimeout(dur!"msecs"(0),
(string s){if(s == "STAHP!") run = false;}
);
}
// clean up
send(parent, "done");
}
void main()
{
auto tid = spa
On Monday, 29 July 2013 at 15:28:45 UTC, lindenk wrote:
Hello!
This is partially a general question as I don't know what this
is called or if it exists. Say for example I want to do
something like the following -
import std.concurrency;
void main()
{
void foo() {
try
{