[issue33590] sched.enter priority has no impact on execution

2018-05-21 Thread sahilmn

sahilmn <sahilmanocha1...@gmail.com> added the comment:

The task schedule is executed when `s.run()` is called. There should be a
*delay = 5*  from the time the scheduling statement is executed.

If your claim is true, the priority argument is useless since it has no
impact on the execution order when `delay` values are equal. Clearly, this
is not the case since the example for `enter` at
https://docs.python.org/3/library/sched.html aims to demonstrate the use of
`priority` argument.

On Mon, May 21, 2018 at 4:14 AM, Ronald Oussoren <rep...@bugs.python.org>
wrote:

>
> Ronald Oussoren <ronaldousso...@mac.com> added the comment:
>
> I don't think  there's a bug here: sched.enter schedules an event some
> time after the current time. The two calls to sched.enter are not at the
> same time, hence the priority is not used because the events are scheduled
> at different times.
>
> --
> nosy: +ronaldoussoren
>
> ___
> Python tracker <rep...@bugs.python.org>
> <https://bugs.python.org/issue33590>
> ___
>

--

___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue33590>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33590] sched.enter priority has no impact on execution

2018-05-20 Thread sahilmn

New submission from sahilmn <sahilmanocha1...@gmail.com>:

`sched.enter` doesn't work as expected. If two events are scheduled with the 
same delay, then their order of execution seems to be dictated by the order of 
`enter` statements for the events instead of the priority order.

Ref attached file with example code. `sched.enterabs` works as expected.

--
files: sched.enter.bug.py
messages: 317215
nosy: sahilmn
priority: normal
severity: normal
status: open
title: sched.enter priority has no impact on execution
versions: Python 3.6
Added file: https://bugs.python.org/file47609/sched.enter.bug.py

___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue33590>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com