[Common-dev] CR: Disable write callbacks after write event completion

[Common-dev] CR: Disable write callbacks after write event completion

Damon Lanphear damonlan at real.com
Thu Aug 26 12:24:33 PDT 2004


Description:

There is  a bug in the write event logic such that write events are not 
removed from the select events after a write event completes.  This 
violates the agreed semantic.  The root of the problem is a failure to 
call SelectEvents with the write event turned off.  In ::OnEvent() the 
write event is removed from the allowed events mask but we never 
notified the derived implementation of this change in the event set.  
The user of the API would not see frequent write events, but on the 
server we would see heavy use of the select() system call.

The solution is to call SelectEvents() with the write event mask turned 
off.  Note that the diff doesn't show the pre-existing code where the 
write event mask is turned off in the allowed events mask...

Files Modified:

HEAD

common/netio/platform/posix/sockimp.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: write_select_loop.diff
Type: application/octet-stream
Size: 842 bytes
Desc: not available
Url : http://lists.helixcommunity.org/pipermail/common-dev/attachments/20040826/70785cac/write_select_loop.obj


More information about the Common-dev mailing list
 

Site Map   |   Terms of Use   |   Privacy Policy   |   Contact Us

Copyright © 1995-2007 RealNetworks, Inc. All rights reserved. RealNetworks and Helix are trademarks of RealNetworks.
All other trademarks or registered trademarks are the property of their respective holders.