From: Terrance S. <ts...@cs...> - 2006-05-22 15:02:53
|
Hi Paulo: I'm happy to work with a standard if that is feasible. We'll probably be releasing version 3.0 very soon, but that doesnt mean that we wont be able to change the thread API (at least in my mind). Here are some preliminary thoughts. -- Platforms vary in their support for Posix (some dont have functions like thread_yeild, for instance), and of course Windows has a completely different mechanism. Differences in implementations make a difference in how much of Posix you can (or want to) support. -- XSB's threading has some features that other Prologs may not have. We allow both private and dynamic code to be either thread-shared or thread-private, and have different mechanisms for allowing thread-shared tables to be evaluated, depending on our tabling strategy. I dont think that this affects the semantics of the thread API, thought. -- In xsb_thread_create/3 we allow users to specify the size of the WAM stacks with which a thread is initialized, while in the Posix thread create function a thread can be initialized with different sizes for a C stack. These are analogous, but certainly different, which is one reason for attaching the "xsb_" to the beginning of the thread create. Of course we could prepend "prolog_". --- I'll be curious to see how your draft handles error balls thrown by threads, and Prolog thread cancellation. To what extend is the handling of Prolog thread cancellation Can you send me a copy of your draft API? On Mon, 22 May 2006, Paulo Moura wrote: > > On 2006/05/21, at 23:50, Terrance Swift wrote: > > > Yes. > > Of course. Silly me. I was looking to the wrong user manual (I've > both 2.71. and CVS versions on my laptop). Sorry for the wasted bits. > > I'm currently working with a PhD student and some Prolog developers > on a draft standard for multi-threading programming in Prolog. The > proposed API is based on POSIX threads and its implemented from some > time in two Prolog compilers (SWI-Prolog and YAP). A third compiler > (Qu-Prolog) is being updated to provide the same interface (with some > functionality of the old QP version being moved the the draft > proposal). Currently, the major difference between the predicates on > the XSB CVS version and our draft is the "xsb_" prefix in the names > of the predicates. I believe that there is an opportunity now to act > proactively as a community on a standard multi-threading programming > API for Prolog. We would like your support for this initiative. Let > us know... > > Best regards, > > Paulo > > > ----------------------------------------------------------------- > Paulo Jorge Lopes de Moura > Dep. of Computer Science, University of Beira Interior > 6201-001 Covilh=E3, Portugal > > Office 4.3 Ext. 3257 > Phone: +351 275319891 Fax: +351 275319899 > Email: <mailto:pm...@di...> > > Home page: <http://www.di.ubi.pt/~pmoura> > Research: <http://logtalk.org/> > ----------------------------------------------------------------- > > > > > > ------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job ea= sier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronim= o > http://sel.as-us.falkag.net/sel?cmd______________________________________= _________ > Xsb-development mailing list > Xsb...@li... > https://lists.sourceforge.net/lists/listinfo/xsb-development > > |