BlazorTemplater icon indicating copy to clipboard operation
BlazorTemplater copied to clipboard

Feature async render

Open PhotoAtomic opened this issue 3 years ago • 1 comments

This is my proposed solution to this issue it was independently developed from the other PR which I've noticed exist only after the facts :( sorry

This solution leverages on the already existing NextRender task without introducing additional synchronization mechanisms like semaphores. As said in the above mentioned issue, the solution have a little of code duplication, there are easy way to fix it and i'm happy to apply the preferred one, let's just discuss it. options are:

  • move common code in a separate method: Pros: easy code, Cons: the method should return more than one value => introduced a new return type with multiple properties or uses anonymous records.
  • make the divergent portion of code to be called as delegate passing multiple argument to it Pros: avoid generation of new types, Cons: less simple code, force to return Task and in case ignore it when not needed
  • other...? let's discuss!

I probably prefer the first :)

PhotoAtomic avatar Sep 21 '22 13:09 PhotoAtomic

I propose to evaluate #30 instead of this one, because this solution was too rushed and doesn't supports certain scenarios at its current state.

PhotoAtomic avatar Sep 22 '22 08:09 PhotoAtomic