Skip to content

Commit

Permalink
Better cancellation. (#57)
Browse files Browse the repository at this point in the history
The expiration mechanism for cancellation had an unintended side effect
of preventing cancellation if one component of the song completed ahead
of time. In other words, if a MIDI file finished playing but there is
still audio to play, the song is no longer cancellable. Additionally, it
would be possible, in some circumstances, for the completion of one
aspect of a song to cancel others unexpectedly.

The "expiration" concept was introduced to allow cancellation while
still allowing a song to finish normally. This has been replaced with a
simple concept of an atomic bool that indicates whether a song component
(MIDI, DMX, or audio) has finished and, when used in combination with
the new "notify" function, will allow a cancel_handle.wait() call to
return without an actual cancellation happening.
  • Loading branch information
mdwn authored Dec 31, 2024
1 parent 52b74da commit 97ac94d
Show file tree
Hide file tree
Showing 11 changed files with 116 additions and 93 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/mtrack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Install licensure
run: cargo install licensure@0.3.2
run: cargo install licensure@0.5.1
- name: Check for licenses
run: licensure --check -p

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
target
.vscode
cobertura.xml
lcov.info
15 changes: 14 additions & 1 deletion .licensure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,26 @@ excludes:
- .*\.yaml
- .*\.wav
- .*\.mid
- lcov.info
licenses:
- files: any
ident: GPL-3.0
authors:
- name: Michael Wilson
email: [email protected]
auto_template: true
template: |+
Copyright (C) [year] [name of author]
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, version 3.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program. If not, see <https://www.gnu.org/licenses/>.
comments:
- columns: 80
Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

The expiration mechanism for cancellation had an unintended side effect
of preventing cancellation if one component of the song completed ahead
of time. In other words, if a MIDI file finished playing but there is
still audio to play, the song is no longer cancellable. Additionally, it
would be possible, in some circumstances, for the completion of one
aspect of a song to cancel others unexpectedly.

The "expiration" concept was introduced to allow cancellation while
still allowing a song to finish normally. This has been replaced with a
simple concept of an atomic bool that indicates whether a song component
(MIDI, DMX, or audio) has finished and, when used in combination with
the new "notify" function, will allow a cancel\_handle.wait() call to
return without an actual cancellation happening.

## [0.1.8] - Better MacOS support.

MacOS support is improved. It's not super thoroughly tested, but has been tested
Expand Down
Loading

0 comments on commit 97ac94d

Please sign in to comment.