Async CTP: welcome new keywords ;-)
async e await mi stanno molto simpatiche, moltoclass Worker
{
public async TaskExecuteAsyn ( T value )
{
var task = await TaskEx.Run( () =>
{
Thread.Sleep( 1000 );
return value;
} );
return task;
}
}
.m
Oct 29, 2010 • Mauro Servienti • Reading time: • Improve this post • Changelog
Tags:
async e await mi stanno molto simpatiche, moltoclass Worker
{
public async TaskExecuteAsyn ( T value )
{
var task = await TaskEx.Run( () =>
{
Thread.Sleep( 1000 );
return value;
} );
return task;
}
}
Mauro is a Solution Architect in Particular Software, the makers of NServiceBus. He spends his time helping developers build better .NET systems leveraging Service Oriented Architecture (SOA) principles and message-based architectures.