Re: [Pharo-users] UFFI asynchronous callbacks

2020-07-27 Thread teso...@gmail.com
Hello, for executing it you will need the headless VM. If you are using Pharo Launcher you can change the VM for that image in the configuration combo box (The click on "Edit Configurations..."). If you are using the zero-conf you can use "wget -O - get.pharo.org/64/vmHeadlessLatest90 | bash"

Re: [Pharo-users] UFFI asynchronous callbacks

2020-07-25 Thread ASAM
no code is needed as I mentioned ... But immediately with the load Metacello new baseline: 'ThreadedFFI'; repository: 'github://pharo-project/threadedFFI-Plugin'; onConflictUseLoaded; load. To rule out possible errors, I tested with a fresh Pharo8 64bit image, of course. -- Sent

Re: [Pharo-users] UFFI asynchronous callbacks

2020-07-25 Thread Ben Coman
Could you provide the actual code you are running? On Sat, 25 Jul 2020 at 16:17, ASAM wrote: > > Hi Pablo, > today I have a little bit of time to try out the "threaded FFI". > But immediately with the load I get the following error message > "PrimitiveFailed: primitive

Re: [Pharo-users] UFFI asynchronous callbacks

2020-07-25 Thread ASAM
Hi Pablo, today I have a little bit of time to try out the "threaded FFI". But immediately with the load I get the following error message "PrimitiveFailed: primitive #primitiveInitializeQueueWith: in TFCallbackQueue failed". see pic:

Re: [Pharo-users] UFFI asynchronous callbacks

2020-07-20 Thread teso...@gmail.com
Hi, as Ben correctly pointed out there is the alternative of using a Queue based approach for FFI. It is available as a plugin for the headless VM and it can be used with Pharo 8. It is here: https://github.com/pharo-project/threadedFFI-Plugin The plugin is already compiled and shipped with the

Re: [Pharo-users] UFFI asynchronous callbacks

2020-07-19 Thread Ben Coman
Hi Asam, On Sun, 19 Jul 2020 at 21:38, ASAM wrote: > > Hello Ben, > > I quickly made a dummy DLL to limit the problem to the essentials. Great idea. A more generic example is attractive for people to examine and help out. I browsed the code but I'm sorry it needs a deeper expertise than I

Re: [Pharo-users] UFFI asynchronous callbacks

2020-07-19 Thread ASAM
Hello Ben, I quickly made a dummy DLL to limit the problem to the essentials. I think my problem comes more from how I use the semaphore. I wanted to do that: only "semaphore signal", But that somehow doesn't work. Now i'm doing that "[ Processor yield. semaphore signal ] fork" (it work's)

Re: [Pharo-users] UFFI asynchronous callbacks

2020-07-18 Thread Ben Coman
Callbacks are supported... http://blog.openinworld.com/2016/09/pharo-libclang-ffi-part-4-ast-walking-with-visitors-callbacks/ but I'm not sure about the "asynchronous" part of your query. cheers -ben On Sat, 18 Jul 2020 at 19:56, ASAM wrote: > I use Pharo 8(64bit) UFFI to call a dll(64bit). >