[Vortex] Rebol Script-Binding / Callback Problem

Francis Brosnan Blazquez francis at aspl.es
Tue Mar 15 10:24:31 CET 2011


Hi Sam,

In cases where the language/gui does not support a global lock, I think
you can integrate vortex by using a VortexAsyncQueue [1].

That is, you just configure vortex handler as usual, and when they are
called, you queue that "event" into the thread safe async queue [2],
using your favorite representation...

Then, you only have to install a idle or timer handler at the
language/gui in cuestion checking for events in the queue, by calling to
[3]...and because that checking is done at the thread that called the
init the language/gui, it should work..

[1] http://www.aspl.es/fact/files/af-arch/vortex/html/group__vortex__thread_gb014e56551835c906bbb473e41cb99d5.html#gb014e56551835c906bbb473e41cb99d5
[2] http://www.aspl.es/fact/files/af-arch/vortex-1.1/html/group__vortex__thread_g28ba5a9be1dc425501a445e4b25940c4.html
[3] http://www.aspl.es/fact/files/af-arch/vortex/html/group__vortex__thread_g144d9bbc8dc875b6da7d7359e8818a49.html#g144d9bbc8dc875b6da7d7359e8818a49

> > 1. Is there a way to run Vortex without multi-threading?
> 
> Most interpreter cores don't support multithreading in a way that's at
> all helpful with libraries like vortex. Python is exceptional in that
> it does, with a global lock.
> 
> I tried to bind vortex into lua, which I suspect has the same
> structure as rebol (which I've looked at briefly, but years ago,
> thought it was dead, actually).
> 
> I think the only way to work this is to write a multithreaded library
> that implements a single-threaded interface to vortex, and where all
> callback responses are queued up to be handled by a single thread, and
> that single thread interacts with the interpreter core. Doing this and
> exposing the full vortex API is hard, but if you limit your API to a
> small set of interactions, it might not be too bad. You'd basically
> "post" requests to your lib, and "pull" responses back from it when
> it's ready.
> 
> 
> You can try to use swirl as a base, if you _really_ want this in
> rebol, its based on the non-threaded beepcore-c:
> 
> https://github.com/sam-github/swirl
> 
> IMO, the easiest way to use vortex/beep from rebol or any other
> language would probably be to write an http/json-rpc server that
> gateways to beep. Most languages allow parallel interactions with http
> servers (usually using poll, or other event notification facilities)
> natively, and you could take advantage of vortex's beep
> implementation. Of course, you'd have to find an embedded C or C++
> http server library, but those exist.
> 
> Cheers,
> Sam
> _______________________________________________
> Vortex mailing list
> Vortex at lists.aspl.es
> http://lists.aspl.es/cgi-bin/mailman/listinfo/vortex
-- 
Francis Brosnan Blázquez <francis.brosnan at aspl.es>
ASPL
91 134 14 22 - 91 134 14 45 - 91 116 07 57

AVISO LEGAL

Este mensaje se dirige exclusivamente a su destinatario. Los datos
incluidos en el presente correo son confidenciales y sometidos a secreto
profesional, se prohíbe divulgarlos, en virtud de las leyes vigentes. Si
usted no lo es y lo ha recibido por error o tiene conocimiento del mismo
por cualquier motivo, le rogamos que nos lo comunique por este medio y
proceda a destruirlo o borrarlo.

En virtud de lo dispuesto en la Ley Orgánica 15/1999, de 13 de
diciembre, de Protección de Datos de Carácter Personal, le informamos de
que sus datos de carácter personal, recogidos de fuentes accesibles al
público o datos que usted nos ha facilitado previamente, proceden de
bases de datos propiedad de Advanced Software Production Line, S.L.
(ASPL). No obstante, usted puede ejercitar sus derechos de acceso,
rectificación, cancelación y oposición dispuestos en la mencionada Ley
Orgánica, notificándolo por escrito a:
ASPL - Protección Datos, C/Antonio Suárez 10 A-102, 28802, Alcalá de
Henares (Madrid).



More information about the Vortex mailing list