mirror of
https://github.com/librespot-org/librespot.git
synced 2026-04-27 08:15:50 +03:00
[GH-ISSUE #374] Non-blocking Player::load #248
Labels
No labels
A-Alsa
SpotifyAPI
Tokio 1.0
audio
bug
can't reproduce
compilation
dependencies
duplicate
enhancement
good first issue
help wanted
high priority
imported
imported
invalid
new api
pull-request
question
reverse engineering
wiki
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/librespot#248
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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 @snaiperskaya96 on GitHub (Sep 22, 2019).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/374
Hiya,
in first place i'm sorry if i'm going to say some random oddities, i'm quite new to rust.
I've been trying to have Player:load running in the background or in such a way i can continue execute my code and interact with the player later on but i've been out of luck so far.
Could you please give me some advises on how to proceed, my code is currently based on the example in examples/play.rs
Is there any alternative to this?
Thank youuu
@snaiperskaya96 commented on GitHub (Sep 22, 2019):
As a follow up i can do stuff like calling
player.load(track, true, 0)and keep polling on it but then it would get stuck at Player::load_track, waiting for Tracket::get() forever 🤷♂@HEnquist commented on GitHub (Sep 24, 2019):
You can maybe run it in a separate thread with
futures_cpupool::CpuPool see the first part of the answer here:
https://stackoverflow.com/questions/41932137/what-is-the-best-approach-to-encapsulate-blocking-i-o-in-future-rs
Something like this (not proper code, just to give an idea):
@HEnquist commented on GitHub (Feb 9, 2020):
Should we close this? It's not really an issue and there's no activity since September..