Sorry, i forgot to mention this would be interfacing on the main thread
from c

does this still hold true? Like if a c call returns does it kill the places?

Nate


On Sun, Sep 13, 2020 at 12:17 PM George Neuner <gneun...@comcast.net> wrote:

>
>
> On 9/13/2020 3:55 AM, Nate Griswold wrote:
>
>
> I am making an app that basically spawns two racket places and i want to
> be able to communicate with them from c code.
>
> Will gc happen in the two racket places if i don't keep the main thread
> (the one that spawned the places) running?
>
>
> Exiting the main thread kills the process.  "dynamic"[1] places are (OS
> level) threads within the same process and they will die with it.
> [Technically the main thread is itself a place, but normally we don't use
> place  terminology when talking about the main thread unless there are
> other places involved.]
>
> I was thinking about whether i should keep the main thread running and
> block on a stream read, sending it messages, or if i can only call into the
> main thread when i need something using racket/chezscheme apis. I guess it
> would be simpler to just talk directly to the main thread when i need to,
> which is why i'm asking. Otherwise i'm thinking of just using zeromq on the
> main thread.
>
>
> You certainly can talk to any of the places individually ... but you do
> need the main thread to remain running (even if just waiting on some event)
> if you want dynamic places to continue running.
>
>
> Now "distributed"[2,3] places are separate processes - you can start them
> and they will continue running regardless of what happens to the process
> that spawned them.
>
> Nate
>
>
> Hope this helps,
> George
>
> [1]  https://docs.racket-lang.org/reference/places.html
> [2]  https://docs.racket-lang.org/distributed-places/index.html
> [3]  https://pkgd.racket-lang.org/pkgn/search?q=loci
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAM-xLPome2k7ubSHk35tSmy-NaQwafm5AbW-h1H-pjqO963Aug%40mail.gmail.com.

Reply via email to