Exemple #1
0
bool ZServer::pWork(ZRef<ZWorker> iWorker)
	{
	ZGuardMtx guard(fMtx);

	if (ZRef<ZStreamerRWFactory> theFactory = fFactory)
		{
		guard.Release();
		if (ZRef<ZStreamerRW> theSRW = theFactory->MakeStreamerRW())
			{
			guard.Acquire();
			if (ZRef<Callable_Connection> theCallable = fCallable_Connection)
				{
				guard.Release();
				try
					{
					ZRef<ZCallable_Void> theCallable_Kill =
						sBindR(sCallable(spKill), theSRW.DynamicCast<ZStreamerRWCon>());
					theCallable->Call(fRoster->MakeEntry(theCallable_Kill, null), theSRW);
					}
				catch (...)
					{}
				}
			}
		iWorker->Wake();
		return true;
		}
	return false;
	}