CraftScheduler#isCurrentlyRunning(taskId) inconsistencies

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Minor
    • None
    • Affects Version/s: None
    • None

      While reading through the CraftScheduler source code I noticed 2 things which seem odd to me related to the CraftScheduler#isCurrentlyRunning(taskId) method:

      Bukkit Javadoc for this method: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/scheduler/BukkitScheduler.html#isCurrentlyRunning-int-

      isCurrentlyRunning() makes use of the 'runners' map: https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java#271
      'runners' seems to contain the just-about-to-be-running and the currently running tasks, as tasks are added to 'runners' as part of parsePending(): https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java#418

      Odd about the isCurrentlyRunning() method:

            Assignee:
            Unassigned
            Reporter:
            blablubbabc
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: