You should be able to use this which I just worked out, to run something with a timeout. Seems to be working by my testing. It might be overkill to run the whole thing in a subthread but it makes certain that nothing interferes with the use of send and receive here. You would normally use it with a lambda taking no arguments, for example (using my ueval)
Ah, right, I see it now. I guess you can check the current-milliseconds after the fact, and force the default value in that case. But looks like this is going to be a problem if I try to safely simulate other agents… Actually, I suppose it’s possible for the target thread to similarly not get returned to for a long time, causing any watchdog to overestimate the time it used.current-process-milliseconds might help with that, but I’m not sure if it can deal with nested threads usefully.
You should be able to use this which I just worked out, to run something with a timeout. Seems to be working by my testing. It might be overkill to run the whole thing in a subthread but it makes certain that nothing interferes with the use of send and receive here. You would normally use it with a lambda taking no arguments, for example (using my ueval)
which is what I’ve been using to test candidates against each other locally.
He said he didn’t want to use sleep, since the argument is only a lower bound on the amount of time it takes.
Ah, right, I see it now. I guess you can check the current-milliseconds after the fact, and force the default value in that case. But looks like this is going to be a problem if I try to safely simulate other agents… Actually, I suppose it’s possible for the target thread to similarly not get returned to for a long time, causing any watchdog to overestimate the time it used.
current-process-milliseconds
might help with that, but I’m not sure if it can deal with nested threads usefully.