hyperledger / aries-framework-swift

A Swift framework for Aries.
Apache License 2.0
17 stars 6 forks source link

fix concurrency issues with replacing concurrent* to async* #46

Closed kukgini closed 1 year ago

kukgini commented 1 year ago

Checklist

Description

fix concurrency issues with replacing concurrent to async

Related Issues

conanoc commented 1 year ago

It could fix the issue but I intended to use the concurrent version for efficiency. Can you create a test case that fails with the concurrent version? The test will also make sure that this change will fix that issue.

kukgini commented 1 year ago

@conanoc As you said, this solution sacrifices performance. However, I believe that improving performance through concurrency only makes sense if stability is achieved.

Unfortunately I don't know how to write a test case that will always fail in unit tests for race condition. Moreover, this error only happens intermittently in my app attached to the bcovrin testnet. AllTests that I do iteratively normally succeed.

conanoc commented 1 year ago

The test doesn't have to fail always. It's enough to fail sometimes. I'll also look at this later.

conanoc commented 1 year ago

50 has merged for this. Thanks for reporting the issue.