<SeanTAllen>
johshoff: hopefully we get you excited sometime!
chamar has quit [Quit: Leaving]
acarrico has quit [Ping timeout: 268 seconds]
SenasOzys has quit [Remote host closed the connection]
SenasOzys has joined #ponylang
bitcrush1 has joined #ponylang
bitcrush1 has quit [Client Quit]
bitcrush1 has joined #ponylang
samuell has joined #ponylang
samuell has quit [Remote host closed the connection]
samuell has joined #ponylang
endformationage has quit [Quit: WeeChat 1.9.1]
SenasOzys_ has joined #ponylang
SenasOzys has quit [Read error: Connection reset by peer]
samuell has quit [Quit: Leaving]
gokr has joined #ponylang
vaninwagen has joined #ponylang
samuell has joined #ponylang
codec1 has joined #ponylang
codec1 has quit [Quit: Leaving.]
codec1 has joined #ponylang
dipin has quit [Quit: dipin]
dipin has joined #ponylang
vaninwagen has quit [Ping timeout: 255 seconds]
vaninwagen has joined #ponylang
bitcrush1 has quit [Quit: WeeChat 1.9.1]
vaninwagen has quit [Ping timeout: 268 seconds]
vaninwagen has joined #ponylang
SenasOzys_ has quit [Remote host closed the connection]
SenasOzys_ has joined #ponylang
vaninwagen has quit [Ping timeout: 240 seconds]
vaninwagen has joined #ponylang
acarrico has joined #ponylang
jemc has joined #ponylang
SenasOzys__ has joined #ponylang
SenasOzys_ has quit [Ping timeout: 250 seconds]
samuell has quit [Remote host closed the connection]
SenasOzys__ has quit [Remote host closed the connection]
SenasOzys__ has joined #ponylang
jemc has quit [Quit: WeeChat 1.9]
endformationage has joined #ponylang
alxs has joined #ponylang
jemc has joined #ponylang
alxs has quit [Ping timeout: 248 seconds]
alxs has joined #ponylang
alxs has quit [Client Quit]
alxs has joined #ponylang
samuell has joined #ponylang
vaninwagen has quit [Ping timeout: 240 seconds]
SenasOzys_ has joined #ponylang
SenasOzys__ has quit [Ping timeout: 248 seconds]
codec1 has quit [Read error: Connection reset by peer]
user10032 has joined #ponylang
aturley has joined #ponylang
aturley_ has quit [Ping timeout: 240 seconds]
dipin has quit [Quit: dipin]
ShalokShalom has joined #ponylang
nisanharamati has joined #ponylang
codec1 has joined #ponylang
Sargun has joined #ponylang
<Sargun>
Is there a mechanism to preempt an actor, or to wait on an actor to die?
<jemc>
Sargun: can you elaborate a bit on what you mean by "preempt"?
<SeanTAllen>
Sargun: the scheduler is cooperative, no way to preempt. An actor can run up to its batch size (100) of messages (behavior calls) and the next actor will be scheduled.
<SeanTAllen>
Re: die... I suspect because i know your background you are thinking of Pony actors like Erlang actors which isn't really the case. What are you looking to do/accomplish Sargun?
<jemc>
for the latter question - the only way to know when an actor "dies" is to have it send you a message when it finishes whatever it was doing, or when someone calls `dispose` on it, if you're using that pattern - in other words, it has to be a message at the application level
<jemc>
note that actors can't "crash" in the erlang sense - they can only be "stopped" by finishing the work they were doing, or being "disposed" to disengage them from whatever open-ended work they were doing
<jemc>
(or whatever other application-level messaging pattern you can think up - but those are the most common ones)
<Sargun>
SeanTAllen: I'm trying to determine whether there is a way to check if a "tree" of actors is finished
<Sargun>
So, like I have 5 requests in progress, and I want to ensure they do not progress any further
<Sargun>
effectively, I want to "join" against them
<SeanTAllen>
So when all five are done, change the state of something and move to the next phase?
<Sargun>
They're effectively "heartbeat" threads
<Sargun>
So, I want to kill the heartbeat actors, and then send a shutdown message
<SeanTAllen>
actors will be "killed" by the runtime when they can no longer receive messages. which means no other actors hold references to them and they arent registered for any async io events.
<SeanTAllen>
the standard pony pattern is to implement "dispose" on an actor and send it a "dispose" message when you want it to shutdown so it can close files, sockets, or whatever
<SeanTAllen>
it will be reaped by the the runtime once there are no more references to it and its not able to otherwise receive messages
<jemc>
Sargun: for that pattern, it sounds like you could look at using `Promise`s, and `Promises.join`
<jemc>
there are more direct ways to acheive it than promises, which are probably the most decoupled way
<Sargun>
Hrm. I'll continue to experiment
<Sargun>
I'm trying to decide whether to choose Pony or Nim for a project
<Sargun>
I don't really need green threads -- thread counts should be <1000
<Sargun>
but, I need strong safety guarantees
<Sargun>
I'm prototyping a locking server replacement to one that's originally written in Go
<SeanTAllen>
Sargun: im confused by the green threads comment.
<SeanTAllen>
Not sure where you are going with that
<SeanTAllen>
By default, the pony runtime will create 1 scheduler thread per CPU and schedule actors on the schedulers using a work stealing algo.
<SeanTAllen>
Additionally there is a main thread that does nothing but wait for the scheduler threads to exit (it does a join on them) and a thread for dispatching async io events.
<SeanTAllen>
There's no green threads at least not under my definition of green thread.
<jemc>
I think a pony actor can kind of be thought of as a "green thread plus", but that's not necessarily the most accurate or productive definition - just a nice place to start for people who are used to thinking of threads
vaninwagen has joined #ponylang
<jemc>
a locking server sounds like a nice use case for pony's strengths
<SeanTAllen>
indeed it does
codec1 has quit [Read error: Connection reset by peer]
SenasOzys_ has quit [Read error: Connection reset by peer]
SenasOzys_ has joined #ponylang
dipin has joined #ponylang
alxs has quit [Quit: Computer's gone to sleep. ZZZzzz…]
SenasOzys__ has joined #ponylang
SenasOzys_ has quit [Ping timeout: 250 seconds]
codec1 has joined #ponylang
ShalokShalom has quit [Remote host closed the connection]
chamar has joined #ponylang
gokr has quit [Remote host closed the connection]
codec1 has quit [Read error: Connection reset by peer]
nisanharamati has quit []
vaninwagen has quit [Ping timeout: 260 seconds]
user10032 has quit [Quit: Leaving]
samuell has quit [Remote host closed the connection]