[usocket-devel] usocket on LispWorks (non-win32 and no multiprocessing)
Chun Tian (binghe)
binghe.lisp at gmail.com
Tue Oct 21 11:24:36 UTC 2008
Hi, usocket-devel
(testing 0.4 branch)
In LispWorks Professional and Enterprise Edition, user can save a
image without thread support. When such a lispworks image started, all
function in MP package is there but no thread running:
binghe at binghe-debian:~$ lispworks-cli
LispWorks(R): The Common Lisp Programming Environment
Copyright (C) 1987-2008 LispWorks Ltd. All rights reserved.
Version 5.1.1
Saved by binghe as lispworks-5-1-1-64-bit-cli, at 12 Jun 2008 14:50
User binghe on binghe-debian.local
CL-USER 1 > (mp:list-all-processes)
NIL
CL-USER 3 > mp:*current-process*
NIL
When there's no thread support in LispWorks, USOCKET:WAIT-FOR-INPUT
cannot be used (on non-win32 platform) because it calls MP:PROCESS-
WAIT on current thread, that will cause a UNKNOWN-ERROR:
USOCKET 9 > (wait-for-input x)
Error: The condition #<UNKNOWN-ERROR 405008A5B0> occurred
1 (abort) Return to level 0.
2 Restart top-level loop.
Type :b for backtrace, :c <option number> to proceed, or :? for other
options
USOCKET 10 : 1 > :b
Call to ERROR
Call to RAISE-USOCK-ERR
Call to SIGNAL
Call to ERROR
Call to MP::WITHOUT-PREEMPTION-ERROR
Call to MP:PROCESS-WAIT
Call to WAIT-FOR-INPUT-INTERNAL
Call to WAIT-FOR-INPUT
Call to WAIT-FOR-INPUT
Call to EVAL
I think may be there're some way not use MP-related function to
achieve the same effect, i.e. direct call select() or turn to use
LispWorks' SYS:WAIT-FOR-INPUT-STREAMS [1] instead (which works on all
platform include win32 but just for stream usocket).
Regards,
Chun Tian (binghe)
[1] http://www.lispworks.com/documentation/lw51/LWRM/html/lwref-765.htm#pgfId-1251327
More information about the usocket-devel
mailing list