Changeset 22131
- Timestamp:
- 10/26/08 02:43:42 (5 years ago)
- Files:
-
- 1 modified
-
lang/c/mpio/trunk/src/iothreads_reader.cc (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/c/mpio/trunk/src/iothreads_reader.cc
r21965 r22131 219 219 220 220 namespace { 221 static void close_ delete_handler(int fd, handler* h) {221 static void close_fd(int fd) { 222 222 ::close(fd); 223 delete h;224 223 } 225 224 } … … 238 237 239 238 void reader::impl::worker::remove_handler(handler* h) 240 try { 241 m_ev.remove(h->fd(), EV_READ); 239 { 240 int fd = h->fd(); 241 m_ev.remove(fd, EV_READ); 242 delete h; 242 243 //::close(fd); // FIXME close(2)はロジックスレッドで 243 244 // 1. fdに対してイベント到着 … … 246 247 // 4. イベントに対して返信するためにsend_data 247 248 // 5. 期待とは異なるfdに返信されてしまう 248 iothreads::submit(close_delete_handler, h->fd(), h); 249 } catch (...) { 250 ::close(h->fd()); 251 delete h; 249 try { 250 iothreads::submit(close_fd, fd); 251 } catch (...) { 252 ::close(fd); 253 } 252 254 } 253 255
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)