mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-01-11 20:00:30 +01:00
.beginAsynchronous will check for main thread #4
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @SteveKChiu on GitHub (Jul 9, 2015).
I am not sure why this assert is needed, as the code show it immediately jump to different queue.
This is what I am doing, I fetch json from server in different queue; upon completion I call .beginAsynchronous to start transaction to store the object, and at that time the queue is NOT main queue.
So my question is whether it is absolutely necessary to call .beginAsynchronous in the main thread? Or we can remove this assertion?
@JohnEstropia commented on GitHub (Jul 9, 2015):
@SteveKChiu You're right, they are completely unnecessary and should be thread-safe without them. There's probably a couple more places where thread checks are overprotective, but I'll remove the ones from the
beginXXXX()methods. Thanks!