slightly faster path for port-commit-peeked with always-evt
svn: r2794
This commit is contained in:
parent
1eee81ca66
commit
1ec48e2e83
|
@ -1928,6 +1928,11 @@ int scheme_peeked_read_via_get(Scheme_Input_Port *ip,
|
||||||
/* No other thread is trying to commit. This one is hereby
|
/* No other thread is trying to commit. This one is hereby
|
||||||
elected "main" if multiple threads try to commit. */
|
elected "main" if multiple threads try to commit. */
|
||||||
|
|
||||||
|
if (SAME_TYPE(t, scheme_always_evt_type)) {
|
||||||
|
/* Fast path: always-evt is ready */
|
||||||
|
return complete_peeked_read_via_get(ip, size);
|
||||||
|
}
|
||||||
|
|
||||||
/* This sema makes other threads wait before reading: */
|
/* This sema makes other threads wait before reading: */
|
||||||
sema = scheme_make_sema(0);
|
sema = scheme_make_sema(0);
|
||||||
ip->input_lock = sema;
|
ip->input_lock = sema;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user