mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-03-14 08:50:48 -07:00
Socket streams are now two-way streams.
This commit is contained in:
parent
d500289efa
commit
dd4d8e036f
2 changed files with 17 additions and 3 deletions
|
|
@ -1177,9 +1177,19 @@ also known as unix-domain sockets."))
|
|||
(let ((stream (and (slot-boundp socket 'stream)
|
||||
(slot-value socket 'stream))))
|
||||
(unless stream
|
||||
(setf stream (let ((fd (socket-file-descriptor socket)))
|
||||
(make-stream-from-fd fd #-:wsock :input-output #+:wsock :input-output-wsock
|
||||
buffering)))
|
||||
(setf stream
|
||||
#+threads
|
||||
(let* ((fd (socket-file-descriptor socket))
|
||||
(in (make-stream-from-fd fd #-wsock :input #+wsock :input-wsock
|
||||
buffering))
|
||||
(out (make-stream-from-fd fd #-wsock :output #+wsock :output-wsock
|
||||
buffering)))
|
||||
(make-two-way-stream in out))
|
||||
#-threads
|
||||
(let ((fd (socket-file-descriptor socket)))
|
||||
(make-stream-from-fd fd #-:wsock :input-output
|
||||
#+:wsock :input-output-wsock
|
||||
buffering)))
|
||||
(setf (slot-value socket 'stream) stream)
|
||||
#+ ignore
|
||||
(sb-ext:cancel-finalization socket))
|
||||
|
|
|
|||
|
|
@ -43,6 +43,10 @@ ECL 10.2.1:
|
|||
to recover from it. Now it jumps to the outermost protection frame
|
||||
(typically the toplevel).
|
||||
|
||||
- Socket streams are now two-way streams. This solves a problem with
|
||||
multithreaded builds in certain platforms (OS X) where a C stream can not be
|
||||
used to read and write simultaneously.
|
||||
|
||||
* Visible changes:
|
||||
|
||||
- Significant speedup in access to hash tables of up to 30% by writing
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue