chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] Using multithreaded foreign library


From: Brandon J. Van Every
Subject: Re: [Chicken-users] Using multithreaded foreign library
Date: Wed, 23 Aug 2006 16:33:53 -0700
User-agent: Thunderbird 1.5.0.5 (Windows/20060719)

felix winkelmann wrote:
On 1/1/00, Tomi Neste <address@hidden> wrote:
Hi, I'm trying to use the PTK library(http://www.phelios.com/ptk/) with
chicken-2.41 on Win32/msvc. Things work fine when compiling to binary with
csc, but if I try to use the repl(either with (repl) or loading the lib
dynamically to csi) everything hangs up as soon as I open a window with
PTK.
That's when compiling the lib multithreaded as it's supposed. Everything, including the repl seem to work fine if I leave out the /mt when compiling
the bindings.
I guess the problem could be in the PTK side but just in case, is it
possible to link a multithreaded library with chicken and does anyone have
any idea why things work fine as long as I don't use repl?


Linking with different runtime libraries is a particularly nasty issue on
Windows and may result in unexplainable freezes and crashes.

The problem is that I'm not able to give decent Windows support, since
I've not done any Windows development for a long time. It may be that adding
/mt to the compiler/linker options of the chicken build helps.

Sorry, I'm not much help here.


In the past I've run into /mt issues when porting other open source builds to VS .NET 2003. I've generally "resolved" them by asking myself, "do I really need multithreaded support?" Typically the answer has been "no," and so that's what I've done. So if there's a way to use the PTK Game Engine in a single threaded mode, I'd evaluate whether that's adequate for your present needs.

Nevertheless, I did do some build work on the hair of /mt targets and so forth. The correct way to support it, would be to create addtional Chicken libraries and exes that enable /mt. It can be done in CMake 2.4.3. I'm not entirely up on whether it's easy or tedious, but I'm sure it's possible. But here's the catch. I'm not going to chase after a /mt build capability in the absence of someone with *real* requirements, who will do *real* work to ensure that /mt is *exercised*. There needs to be a reliable consumer for this. If your interest in /mt and the PTK Game Engine is transient rather than resolute, I will say "eh" to worrying about it myself. I will of course take patches, from anyone who does just about anything useful in CMake, /mt or otherwise.

Two ways to ensure the exercise:
- have someone, like yourself, make serious regular use of a /mt consumer
- have people, other than myself, implement nightly testing suites for Chicken in general

We've talked about testing suites before, but as far as anyone stepping up to do real work, crickets have chirped. I still have plenty of real work of my own to do. I'm interested in Kitware's offer of CTest dashboard resources, but it will be quite some time before it becomes a priority to me. I would like to see other people take responsibility for such a major area of Chicken infrastructure.


Cheers,
Brandon Van Every





reply via email to

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