RestClient icon indicating copy to clipboard operation
RestClient copied to clipboard

C-Sharp-Promise vs UnityFx.Async

Open jdnichollsc opened this issue 5 years ago • 3 comments

Review the advantages to migrate the promises system and support async / await

jdnichollsc avatar Jan 21 '19 23:01 jdnichollsc

Hey! First of all thank you for your interest in UnityFx.Async. You can find a detailed comparison of the two libraries in README.md at the project Github repo.

Summing it up:

  • UnityFx.Async is an open source project just as C-Sharp-Promise;
  • UnityFx.Async supports most features of C-Sharp-Promise;
  • UnityFx.Async is thread-safe;
  • UnityFx.Async supports async/wait as well as Unity coroutines (you can yield any operation);
  • UnityFx.Async is more efficient (less overall memory used and less allocations made).
  • UnityFx.Async is split into two parts: NuGet package without Unity dependencies and AssetStore package that contains the core and Unity-specific stuff.

The only drawback is it is pre-release still (release is planned in a few months) and not as widely used (documented) as C-Sharp-Promise. Also please note that currently published Asset Store package does not support async/await because it targets net35, the NuGet package supports net35, net46 and netstandard20.

That said, in case you decide to migrate, I'd happily assist you with the migration process and any difficulties you may face. Feel free to ask any more questions!

Arvtesh avatar Jan 22 '19 08:01 Arvtesh

@Arvtesh woww excellent mate, let me create other branches in order to integrate your package and debug the different targets, thanks for your collaboration! 👍

jdnichollsc avatar Jan 22 '19 15:01 jdnichollsc

Unity would probably move towards their own Job System rather than embrace async/await feature of c#

kolodi avatar Mar 15 '19 14:03 kolodi