On Wednesday 04 June 2008 16:30:18 NotFound wrote:

> This patch gets rid of the global pio_registered_layers, by putting it
> in interpreter data, creating and destroying the the layers in the
> first interpreter and propgating his value to the child ones. This way
> will solve threading issues (supposed that creating several main
> interpreters is not valid).

That seems reasonable.  This bit in src/io/io.c:

@@ -415,11 +408,17 @@

+            interp->piolayers = (ParrotIOLayer **)mem_sys_allocate(
+                    sizeof (ParrotIOLayer *) * (n + 1));

... could be cleaner with the macro mem_allocate_n_typed.

Right now we don't support creating multiple main interpreters, if by "main 
interpreter" we mean "interpreter without a parent".  I'm not sure we ever 
will, though we probably ought to have some code-enforced policy to that 
effect in the external API.

-- c

Reply via email to