Comments (3)
i remember us talking about that at some point when i was wondering if you could use it inside a function. Didn't we decide the safe way was to wrap the wrapper var in a struct?
from otatomics.
It's mostly a paradigm shift - the concurrent code should do all its mutation externally, finish up, and return the final result synchronously within the method. But nothing should be concurrently mutating a local variable declared within the function.
A property wrapper is already wrapping the value, so adding more layers of wrapping won't really improve the situation. On the whole, there is no safe way to mutate a local var concurrently.
from otatomics.
That's where something like the operations library I've worked on come in handy (OTOperations, based on NSOperation). You can wrap concurrent work in a BasicOperation
and execute it synchronously within a method if you choose.
And there's a host of other API that do similar things in the standard lib or otherwise. Again, just a paradigm shift.
from otatomics.
Related Issues (2)
- Memory leaks HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from otatomics.