Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2000:
[Freeciv-Dev] Working on client APIs
Home

[Freeciv-Dev] Working on client APIs

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Working on client APIs
From: "jrb3@xxxxxxxx (Joseph Beckenbach III, CCP)" <jrb3@xxxxxxxx>
Date: Fri, 07 Jul 2000 13:51:45 -0700
Reply-to: jrb3@xxxxxxxxx

Hi FreeCiv'ers!

        Hard at work and chipping away at the BeOS client.  Along the way,
I've been generating the list of functions which are declared or used in
the generic client code, and which each concrete client needs to implement.

        Right now, they're documented only by comments in the gui-beos/ code
as HOOK functions.  Around five are EXTERNAL HOOK (my term for "called in
generic client code and provided by concrete client").  The rest are defined
by client/include/*.h and only used internally to each concrete client.

        What's interesting about the BeOS client is that is has to be
multithreaded and in C++ -- this means that plenty of those HOOK functions
(which are "C" style) are simply going to forward requests to one of several
active threads.  And since each of those threads will be calling out into
the common and client-generic portions, they'll need to be made thread-safe.
Whee whoopie skip.  Most notably, the communications code will need to get
and put data while the UI is active.

        Has anyone started working on this, either as direct multithread
support, or as "defining the client-side API"?  I have a gut feel that all
the code will need to be rewritten to be multithreaded, and then let the
single-threaded client support be a special case (eg Lock() and Unlock()
on the "shared data areas" as no-ops for the single-threaded)


                Joseph



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