Hey all,

Some notes about using WSocketNotifier. There is very usefull class In some 
cases. But:
1. source file Server.C,:  bool Server::socketSelected(...).
     May be we must  call "delete s" AFTER ret = 
Wt::WebController::instance()->socketSelected(descriptor) because we need read 
from socket in notify()?
2. source WebController.C  WebController::socketSelected(int descriptor)
     When work some concurent sessions with WSocketNotifier there always  dead 
lock.  I am try solve this:  call destructor of  UpdateLock  before 
sessionsLock.lock();
...............................................
#ifdef THREADED
  WApplication *app = session->app();
  WApplication::UpdateLock *l = new 
WApplication::UpdateLock(app->getUpdateLock());
  sessionsLock.unlock();
#endif // THREADED
notifier->notify();
#ifdef THREADED
  //There we must free lock
  delete l;
  sessionsLock.lock();
............................................
3. But after p.1(delete s) we have potential problem dublicated sockets, if we 
try in notify() create next WSocketNotify.... This I solve by adding metod 
hasSocket(int) for check dublicated. 

Regards,
Alex Zakharov

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to