blob: 19a86fff68f5acfa955fd4040e0d1bf9d79d6412 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
using System.Threading;
namespace jive
{
public interface ISynchronizationContext : Command<Command> {}
public class SynchronizedContext : ISynchronizationContext
{
readonly SynchronizationContext context;
public SynchronizedContext(SynchronizationContext context)
{
this.context = context;
}
public void run(Command item)
{
context.Post(x => item.run(), new object());
//context.Send(x => item.run(), new object());
}
}
}
|