Skip to content

AsyncScheduler: Ability to schedule сoroutines#357

Open
pirroman wants to merge 30 commits into
dbader:masterfrom
pirroman:async_scheduler
Open

AsyncScheduler: Ability to schedule сoroutines#357
pirroman wants to merge 30 commits into
dbader:masterfrom
pirroman:async_scheduler

Conversation

@pirroman

Copy link
Copy Markdown

Hey. Added the ability to create a scheduler for asynchronous tasks. The implementation of AsyncScheduler does not affect the existing functionality in any way and backward compatibility is fully supported. Even on python 2.7 the library also continue works. The new functionality has been covered with tests.

P.S. I plan to use this tool in my projects, so the asynchronous part will be developed and maintained by me.

@grmozhaev

Copy link
Copy Markdown

Great job! Hope to see this PR merged soon.

@coveralls

coveralls commented Mar 19, 2020

Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 100.0% when pulling 8e1c263 on pirroman:async_scheduler into 705f373 on dbader:master.

@ashwinrz

ashwinrz commented Apr 3, 2020

Copy link
Copy Markdown

Awesome! Can we get this merged?

@aekasitt

Copy link
Copy Markdown

Bump

@davenewham

Copy link
Copy Markdown

bump again. This is a great feature. I pulled the branch and it works perfectly :)

@pirroman

Copy link
Copy Markdown
Author

@davenewham Thanks! You can fork from my fork ;)

@07pepa 07pepa left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe will be smart to add python 3.9 and test it also

Comment thread setup.py Outdated
Comment thread schedule/__init__.py Outdated
@07pepa

07pepa commented Oct 14, 2020

Copy link
Copy Markdown

I have related pull request #391 and i noticed yours now.

But you solution for running corutines is much better....mine was mostly concerned about handling os signals fast (even with long sleeps/waits between runs of run_pending)

i think we should join our efforts since you will eventualy have to write about pitfalls of asyncio and fact it will run concurenly all sechuded jobs... so control/data race condition may emerge

@pirroman

pirroman commented Jan 4, 2021

Copy link
Copy Markdown
Author

@07pepa, Hello! I'm so sorry for so long to respond. I am always in favor of cooperation. I suggest you make a PR to my fork. I promise to review it soon as possible.

@07pepa

07pepa commented Jan 4, 2021

Copy link
Copy Markdown

@07pepa, Hello! I'm so sorry for so long to respond. I am always in favor of cooperation. I suggest you make a PR to my fork. I promise to review it soon as possible.

i will try to get it to it in next few weeks

@SijmenHuizenga

Copy link
Copy Markdown
Collaborator

Thanks a lot for the detailed response! I will take some time to experiment and get my thoughts together. But first I will be working on the 1.0.0 release as detailed in #412. After that I will be back here :)

@SijmenHuizenga

Copy link
Copy Markdown
Collaborator

As an experiment I've implemented async support by adding run_pending_async and run_all_async to the main scheduler. See #438. I would love to hear what you think about supporting coroutines in such a way @pirroman

@ndbeals

ndbeals commented Sep 14, 2021

Copy link
Copy Markdown

Any news regarding the progress of this?

@pirroman

Copy link
Copy Markdown
Author

@SijmenHuizenga @ndbeals I apologize for this looong delay. I promise I'll get back to progress this weekend.

@pirroman

Copy link
Copy Markdown
Author

@SijmenHuizenga Honestly, I like my version more. It is stricter and more structured. That is, the explicit creation of an asynchronous scheduler in the code will explicitly talk about the ability to handle asynchronous tasks, while combining asynchronous and synchronous interfaces creates more risks of using synchronous interface on asynchronous tasks.

In the recent changes I went a little further and used inheritance only to share common functionality. Interface classes are no longer divided, thought that one interface returning different types is bad.

@gaby

gaby commented Sep 28, 2021

Copy link
Copy Markdown

@dbader Can we get this merge? PR has been open for almost 2 years!

@grantmagdanz

Copy link
Copy Markdown

I'm also looking for a way to schedule async tasks. Would love to get an update on if / when this might be merged!

@gaby

gaby commented Nov 4, 2021

Copy link
Copy Markdown

@dbader @SijmenHuizenga Friendly bump

@Kayden-lolasery

Copy link
Copy Markdown

It'll be nice if a note was placed in the README indicating no support for this library is being provided any longer

@gaby

gaby commented Sep 19, 2022

Copy link
Copy Markdown

The library had commits this year, but for some reason the developers don't answer on this PR

@NomadicDeveloper22

Copy link
Copy Markdown

@dbader not sure if this PR is just flying under the radar on your github notifications, but this seriously needs merged

@Dorbmon

Dorbmon commented Aug 25, 2024

Copy link
Copy Markdown

Hi, is there anything new about this? 4 years pass :)

@gaby

gaby commented Aug 25, 2024

Copy link
Copy Markdown

@Dorbmon One day

@Dorbmon

Dorbmon commented Aug 25, 2024

Copy link
Copy Markdown

@gaby sad :(

@gaby

gaby commented Aug 25, 2024

Copy link
Copy Markdown

Hello @SijmenHuizenga @dbader @connorskees Any chance of getting this merged? Having async support would be very helpful for this library.

Thanks!

@kulame

kulame commented Nov 7, 2024

Copy link
Copy Markdown

How is the progress? Are there other asynchronous scheduling libraries available as alternatives?

@gaby

gaby commented Nov 7, 2024

Copy link
Copy Markdown

@SijmenHuizenga Friendly ping

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.