mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 19:50:24 +02:00
Remove locking in scm_end_input
* libguile/ports.c (scm_end_input): Sadly, we can't naively lock around the scm_port_buffer_take, as it might throw. Will revisit in the future.
This commit is contained in:
parent
122c8e6b37
commit
abf90c4e72
1 changed files with 0 additions and 3 deletions
|
@ -2383,11 +2383,8 @@ scm_end_input (SCM port)
|
||||||
size_t discarded;
|
size_t discarded;
|
||||||
|
|
||||||
pt = SCM_PTAB_ENTRY (port);
|
pt = SCM_PTAB_ENTRY (port);
|
||||||
|
|
||||||
scm_i_pthread_mutex_lock (pt->lock);
|
|
||||||
buf = SCM_PTAB_ENTRY (port)->read_buf;
|
buf = SCM_PTAB_ENTRY (port)->read_buf;
|
||||||
discarded = scm_port_buffer_take (buf, NULL, (size_t) -1);
|
discarded = scm_port_buffer_take (buf, NULL, (size_t) -1);
|
||||||
scm_i_pthread_mutex_unlock (pt->lock);
|
|
||||||
|
|
||||||
if (discarded != 0)
|
if (discarded != 0)
|
||||||
SCM_PORT_DESCRIPTOR (port)->seek (port, -discarded, SEEK_CUR);
|
SCM_PORT_DESCRIPTOR (port)->seek (port, -discarded, SEEK_CUR);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue