You can generalise the above pattern, by further providing two Action arguments, to the CTOR of a class called e.g. Executor, resulting in generalised deterministic execution of code, the same way you'd use destructors in C#. I once create an HTML renderer using such tricks :)
It becomes a bit tricky as you start having code that might throw exceptions, etc - But still a nice way to achieve "deterministic execution" ... :)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Najs one! :)
You can generalise the above pattern, by further providing two
Action
arguments, to the CTOR of a class called e.g.Executor
, resulting in generalised deterministic execution of code, the same way you'd use destructors in C#. I once create an HTML renderer using such tricks :)It becomes a bit tricky as you start having code that might throw exceptions, etc - But still a nice way to achieve "deterministic execution" ... :)