我想做相同的事情:
if (dispatcher.CheckAccess())
{
// invoke synchronously if we are on the dispatcher thread
collectionChangedEventHandler(this, args);
}
else
{
dispatcher.BeginInvoke(new Action(() => collectionChangedEventHandler(this, args)));
}
我还没有找到使用IScheduler
。
我想要的伪代码:
if (scheduler.CheckAccess())
{
collectionChangeEventHandler(sender, args);
}
else
{
scheduler.Schedule(() => collectionChangeEventHandler(sender, args));
}
CurrentThreadScheduler.ScheduleRequired
看起来很有希望,但文档很少。
答案 0 :(得分:1)
不,但您可以编写自己的2015/07/11 15:58:34 [error] 2857#0: *374 FastCGI sent in stderr: "PHP message: PHP Warning: mysqli::real_connect(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed in /srv/www/test.php on line 15
PHP message: PHP Warning: mysqli::real_connect(): Cannot connect to MySQL by using SSL in /srv/www/test.php on line 15
PHP message: PHP Warning: mysqli::real_connect(): [2002] (trying to connect via tcp://192.168.130.123:42139) in /srv/www/test.php on line 15
PHP message: PHP Warning: mysqli::real_connect(): (HY000/2002): in /srv/www/test.php on line 15".....
来装饰CheckAccessDispatcherScheduler
。
DispatcherScheduler