Comments (3)
Thank you, it works after replacing "rx" with "reactivex"
from rxpy.
I've found the reason, this happens because the observable "complete" before the emitting
If I run the code below
def f(o,s):
o.on_next(1)
o.on_next(3)
# o.on_completed()
def g(o,s):
o.on_next(2)
o.on_next(4)
# o.on_completed()
a=create(f)
b=create(g)
c=rx.zip(a,b)
c.subscribe(
on_next=print,
on_error=print,
on_completed=lambda : print("Completed")
)
There will be output, but if I add o.on_completed()
at the end of f
and g
, then there will be just "Completed" output
Then I set some breakpoints at the source code of zip
function and find that observer.on_next(res)
is invoked after "Completed" is output, but there is still something not emitted(otherwise on_next will not be invoked), so this "Completed" must be a bug
I don't know how to fix it, but I guess this is caused by synchronized
from rxpy.
Hi @QZero233
Thank you for opening this issue;
I just tried the above code (almost exactly) on Windows 10, RxPy 4.04 and Python 3.9 - so almost same as your set up - and the output shows as expected: 2, 4, 12, 16 (since you have the mul
operator)
The only change I made was to import reactivex rather than rx since that's the correct import in v4.
from rxpy.
Related Issues (20)
- How to on_next from background thread in main thread? HOT 3
- [Question] shiping data between asyncio and rxpy HOT 1
- [Question] Reading/writing from/to a Pandas DataFrame in rxpy HOT 2
- [TESTING] Notification equality uses string representation HOT 2
- Cannot pickle reactive classes
- unexpected behaviour regarding item count HOT 2
- Rolling throttle operator
- reactivex.timer emits immediately on second subscription HOT 1
- Unexpected results of switch_map operator HOT 1
- Verson number in GitHub release is 0.0.0
- [BUG] buffer_with_time_or_count lost some data HOT 1
- [BUG] buffer_with_time_or_count loses data
- Python 3.12 deprecates timezone non aware utcfromtimestamp() and utcnow()
- This is a concurrent library, but not thread safe?
- AsyncIOScheduler.schedule is not thread safe!
- RxPY/ example / timer.py broken: Future is not iterable
- switch_map() operator not listed in documentation
- `operators.retry(n)` interferes with non-erroring repeats
- Concurrent Execution Not Working as Expected with RxPY ThreadPoolScheduler 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 rxpy.