Comments (8)
Hi @alladinian @maxkonovalov ,
This should be solved in 3.0.0 (Swift 4) 🎉
Thanks a ton!
from ws-deprecated.
@alladinian Thanks a lot for reporting this.
Indeed latest version uses latest then
version that has been patched for some retain cycles.
Looks like the patch ends up changing the behaviour down the road...
I'll try to look at this this week and keep you posted :)
from ws-deprecated.
@alladinian I haven't forgotten you :)
I've been working on an update for then (freshOS/Then#29)
I'm curious if that would solve your issue and the regressions you pointed out.
Could you elaborate a bit more so that we can test it out ?
Have a wonderful weekend,
from ws-deprecated.
@s4cha Hi there!
No worries, I appreciate it :)
You're right, I should have elaborated more on this.
The problem I stumbled upon was related to resolveOnMainThread()
so I don't think this is an issue of then
library.
The implementation of the function captures self
(an instance of a Promise
) as weak
, which means that if we do not hold a strong
reference to the promise on which we chained a resolveOnMainThread()
, we break the whole chain (since the first promise is deallocated when we reach the end of the local scope - see my example above. Just fill the blanks with print statements & you should be able to verify that finally/hideLoading()
is never called...).
The problem is solved by not specifying the captured self
as weak
, but I did not verify that it doesn't introduce any memory leaks...
I hope that this makes sense and it's helpful to you,
Thanks again for this great project,
Vasilis
from ws-deprecated.
Hey guys, I can confirm that resolveOnMainThread()
stopped working for me, too. The resulting then
, onError
, etc. never get called. I tried to keep a strong ref to the returned Promise, but it didn't help either.
from ws-deprecated.
@alladinian can we close this issue?
from ws-deprecated.
@s4cha Sure, seems to be fixed. Also... Happy new year guys 🍻
from ws-deprecated.
Yeah! You to @alladinian thanks again for your time and effort !!!
Let 2018 be awesome!!!! 🍾
from ws-deprecated.
Related Issues (20)
- Handle double parameters for multipart request HOT 4
- Post promise error HOT 6
- Accessing AF's response validation HOT 2
- How to upload multiple file at once? HOT 1
- is there a way to get the headers of a request's reply ?
- Please update version 3.1.0 on Cocoapods HOT 2
- How to get json returned when server response is 422 ? HOT 3
- Is there any file upload api ? HOT 2
- error version thenPromise (3.0.2)
- Release 3.1.0 not available in CocoaPods HOT 1
- Parameter Encoding in WSRequest
- REFRESH REQUEST HOT 1
- How can I cancel a request?
- Auth Header Bearer Token refresh, AF5 beta HOT 2
- When will swift5 be supported? HOT 3
- Add PATCH method. HOT 1
- Usage in an extension
- Supporting multiple multipart data
- SPM package is broken for Xcode12
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 ws-deprecated.