🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: fj.lang.lisp
Article #501

(lucid::waiting-for-input-from-stream)

#501
From: Hisao Kuroda
Date: Wed, 22 Jan 1992 10:07
63 lines
2995 bytes
CLM 2.0 $@$r(J CMU Common Lisp $@$GF0$+$=$&$H$7$F$$$^$9$,!"(Jlucid.lisp excl.lisp $@$N(J
$@<!$NItJ,$r$I$&=q$-49$($l$PNI$$$+$o$+$j$^$;$s!#(J

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;; Listen to the Motif server. Doesn't look for blocked callbacks
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

$@#L#U#C#I#D$G!"(J
(defun  wait-for-input-from-server (connection)
  (unless (listen-for-input connection)
    (lucid::waiting-for-input-from-stream 
     (toolkit-connection-lisp-stream connection)
     (lucid::with-io-unlocked
      (process-wait "event wait" #'listen-for-input connection)))))

$@#E#X#C#L$G$O!"(J
(defun wait-for-input-from-server (connection)
  (unless (listen-for-input connection)
	  (mp::mpwatchfor (toolkit-connection-stream connection))
	  (process-wait "event wait" #'listen-for-input connection)
	  (mp::mpunwatchfor (toolkit-connection-stream connection))))


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;; Listen to the Motif server and wait for timeouts
;;;;; Also looks for blocked callbacks
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

$@#L#U#C#I#D$G!"(J
(defun  wait-for-input-or-timeout (interval connection)
  (unless (listen-for-input connection)
    (lucid::waiting-for-input-from-stream 
     (toolkit-connection-lisp-stream connection)
     (lucid::with-io-unlocked
      (if interval
	  (process-wait-with-timeout "event wait" interval
				     #'input-available connection)
	(process-wait "event wait" #'input-available connection))))))

$@#E#X#C#L$G$O!"(J
(defun wait-for-input-or-timeout (interval connection)
  (unless (input-available connection)
	  (mp::mpwatchfor (toolkit-connection-stream connection))
	  (if interval
	      (process-wait-with-timeout "event wait" interval
					 #'input-available connection)
	      (process-wait "event wait"   #'input-available connection))
	  (mp::mpunwatchfor (toolkit-connection-stream connection))))

$@$3$3$G;H$C$F$$$k(J

(lucid::waiting-for-input-from-stream)
(lucid::with-io-unlocked)

(mp::mpwatchfor)
(mp::mpunwatchfor)

$@$3$l$i$O$J$K$r$9$k$b$N$G!"(J
CMU Common Lisp $@$^$?$O(J KCL $@$G$O$I$N4X?t$KAjEv$9$k$N$G$7$g$&$+!)(J

	Mathmatical Systems Institute Inc.
	6F AM BLDG. 2-5-3 Shinjuku, Shinjuku-Ku, Tokyo Japan
	E-mail : kuroda@msi.co.jp (Kuroda,Hisao)
Technical Details
Message-ID: <358@msisun.msi.co.jp>
Path: arc1-ca.pugleaf.net!sparky!uunet!sun-barr!ccut!wnoc-tyo-news!sh.wide!kogwy!msisun!kuroda

Show Full Headers
Complete Article Headers
X-Google-Language: Japanese,JIS
X-Google-Thread: 1421c0,b62dc286829ed99f,start
X-Google-Attributes: gid1421c0,public
X-Google-ArrivalTime: 1992-01-22 06:43:10 PST
Path: arc1-ca.pugleaf.net!sparky!uunet!sun-barr!ccut!wnoc-tyo-news!sh.wide!kogwy!msisun!kuroda
From: kuroda@msisun.msi.co.jp (Hisao Kuroda)
Newsgroups: fj.lang.lisp
Subject: (lucid::waiting-for-input-from-stream)
Message-ID: <358@msisun.msi.co.jp>
Date: 22 Jan 92 10:07:30 GMT
Distribution: fj
Organization: MSI.Inc. Shinjyuku-ku,Tokyo,JAPAN
Lines: 63