Got promoted to Unit Head Innovations (managing the Eindhoven office) at the Innovations Department of Allseas Engineering B.V. 🙂
The Swiss-based Allseas Group is a global leader in offshore pipeline installation, heavy lift and subsea construction. We employ over 2500 people worldwide and operate a versatile fleet of specialised heavy-lift, pipelay and support vessels, designed and developed in-house.
My first little Unity 3D Virtual Reality project, inspired by my old friend the Nintendo Entertainment System. Please keep in mind the I have never used Unity 3D before, so this is my first sandbox application…
Elske and I spend two full days and one night at the Campus Party in the Jaarbeurs Utrecht. I even managed to get on the stage to give a little talk about: How to start with Virtual Reality game development 🙂
It’s not super useful in practice, but a nice little exercise that combines to cool C# features into a fun asynchronous “magic” trick.
privateconstint INFINITE = -1;
publicstaticasyncTask MutableWhenAll(thisObservableCollection<Task> collection)
await MutableWhenSomething(collection, Task.WhenAll);
publicstaticasyncTask MutableWhenAny(thisObservableCollection<Task> collection)
await MutableWhenSomething(collection, Task.WhenAny);
privatestaticasyncTask MutableWhenSomething(thisObservableCollection<Task> collection, Func<IEnumerable<Task>, Task> whenSomething)
Task waitAllTask = null;
Task helperTask = null;
bool isCollectionChanged = false;
//Cancellation on collection changed eventvar cts = newCancellationTokenSource();
var cancelActionHandler = (sender, arg) => cts.Cancel(false);
collection.CollectionChanged += cancelActionHandler;
waitAllTask = whenSomething(collection);
//Wait on current collection or collection changed eventtry
helperTask = Task.Delay(INFINITE, cts.Token);
isCollectionChanged = cts.IsCancellationRequested;
collection.CollectionChanged -= cancelActionHandler;
//Return the WaitAll on collection resultsawait waitAllTask;
A simple example application that demonstrates the MutableWhenAll extension on an observable collection of tasks. The longest running task is added to the observable collection after MutableWhenAll is called, but the MutableWhenAll will complete only when all tasks (included this longest running task) are completed.