chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] Re: C hang Solved (was Re: Calling out to C causing hang


From: Felix Winkelmann
Subject: [Chicken-users] Re: C hang Solved (was Re: Calling out to C causing hang)
Date: Mon, 07 Apr 2003 15:39:58 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.0) Gecko/20020530

Chris Double wrote:
On Tue, 08 Apr 2003 01:10, Felix Winkelmann wrote:

Not exactly a problem, but you have to make ABSOLUTELY SURE
that the do_event() (in your example) is a `foreign-callback-lambda[*]'.
That's essential! `foreign-lambda*' is wrong.


Well, how about that. I changed my call of do_event to use:

(define wrapper-do-event
        (foreign-callback-lambda void "do_event" c_pointer))

When I call this things work perfectly. When I use the SWIG wrapper things fail. I guess the SWIG wrapper doesn't know that it's going to call a Scheme callback so it has no idea to do this.

I guess there's no problem after all!

I've now got multiple OpenGL windows running with background threads in the interpreter still operating at the same time, yay!

Many thanks for your help here Felix. I'm glad it was so easily sorted. While I could be disappointed about the time I spent debugging, at least I learnt a lot about the internals of the Chicken garbage collector!


Yep, sorry for that misunderstanding. I will ask Jonah to
add a note in the SWIG docs about callbacks.


cheers,
felix






reply via email to

[Prev in Thread] Current Thread [Next in Thread]