Skip to content

Commit 0aeb085

Browse files
committed
Merge branch 'dev'
2 parents fba6278 + 69f224d commit 0aeb085

File tree

16 files changed

+95
-89
lines changed

16 files changed

+95
-89
lines changed

NEWS.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# DiscreteEvents news
22

3+
## v0.3.5
4+
(released 2023-02-23)
5+
- updated compat
6+
- removed multi-threading (parallel clocks) from export and docs
7+
38
## v0.3.1
49

510
(released 2020-09-16) A few days after the release of v0.3.0 Hector Perez contributed some macros to make the `DiscreteEvents` API more Julian for common cases:

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "DiscreteEvents"
22
uuid = "127e53a7-d08a-4bd9-afb0-daf0d2b65a85"
33
authors = ["Paul Bayer <Paul.Bayer@gleichsam.de>"]
4-
version = "0.3.4"
4+
version = "0.3.5"
55

66
[deps]
77
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
@@ -12,7 +12,7 @@ Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d"
1212

1313
[compat]
1414
DataStructures = "0.17, 0.18"
15-
Distributions = "0.22, 0.23, 0.24"
15+
Distributions = "0.22, 0.23, 0.24, 0.25"
1616
Unitful = "1"
1717
julia = "1"
1818

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ julia> include("examples/intro.jl")
8787
</code></pre>
8888
</details>
8989

90-
For further examples see the [documentation](https://pbayer.github.io/DiscreteEvents.jl/dev), or the companion site [DiscreteEventsCompanion](https://pbayer.github.io/DiscreteEventsCompanion.jl/dev/).
90+
For further examples see the [documentation](https://pbayer.github.io/DiscreteEvents.jl/dev).
9191

9292
## Installation
9393

docs/make.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ makedocs(
1818
"processes.md",
1919
"actors.md",
2020
"resources.md",
21-
"parallel.md",
2221
"usage.md"],
2322
"Internals" => [
2423
"internals.md",

docs/src/clocks.md

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -39,52 +39,6 @@ You can query the current clock time:
3939
tau
4040
```
4141

42-
## Parallel Clocks (Experimental)
43-
44-
Parallel clocks are a new feature in v0.3 and cannot yet considered to be stable. Please develop your applications first single-threaded before going parallel. Please report any failures.
45-
46-
Parallel clocks are virtual clocks with local clocks on parallel threads to support multi-threaded simulations.
47-
48-
A parallel clock structure consists of a master (global) clock on thread 1 and [`ActiveClock`](@ref)s on all available threads > 1. An active clock is a task running a thread local clock. The thread local clock can schedule and execute events locally.
49-
50-
The master clock communicates with its parallel active clocks via message channels. It synchronizes time with the local clocks. Tasks (processes and actors) have access to their thread local clock from it and then work only with the local clock.
51-
52-
```@docs
53-
PClock
54-
pclock
55-
```
56-
57-
Parallel clocks can be identified by their thread number: the master clock works on thread 1, local clocks on parallel threads ≥ 2. They can be setup and accessed easily:
58-
59-
```@repl clocks
60-
@show x=nthreads()-1;
61-
clk = PClock() # now the clock has (+x) active parallel clocks
62-
ac2 = pclock(clk, 2) # access the active clock on thread 2
63-
ac2.clock # the thread local clock
64-
ac2.clock.ac[] # local clocks can access their active clock
65-
```
66-
67-
Tasks on parallel threads have access to the thread local clock by `pclock(clk)`. Then they can schedule events, `delay!` or `wait!` on it as usual. The thread local clock is passed to a `process!` automatically if you set it up on a parallel thread.
68-
69-
You can fork explicitly existing clocks to other threads or collapse them if no longer needed. You can get direct access to parallel active clocks and diagnose them.
70-
71-
```@docs
72-
fork!
73-
collapse!
74-
```
75-
76-
```@repl clocks
77-
clk = Clock() # create a clock
78-
fork!(clk) # fork it
79-
clk # it now has parallel clocks
80-
collapse!(clk) # collapse it
81-
clk # it now has no parallel clocks
82-
```
83-
84-
```@docs
85-
diagnose
86-
```
87-
8842
## Real Time Clocks (Experimental)
8943

9044
Real time clocks are a new feature in v0.3 and thus cannot yet be considered as stable. Please try and report problems.

docs/src/history.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,18 @@
33
```@meta
44
CurrentModule = DiscreteEvents
55
```
6+
## v0.3.1
7+
A few days after the release of v0.3.0 Hector Perez contributed some macros to make the `DiscreteEvents` API more Julian for common cases:
8+
9+
- [`@event`](@ref): wraps [`fun`](@ref) and [`event!`](@ref) into one call,
10+
- [`@periodic`](@ref): wraps [`fun`](@ref) and [`periodic!`](@ref) into one call,
11+
- [`@process`](@ref): wraps [`Prc`](@ref) and [`process!`](@ref) into one call,
12+
- [`@wait`](@ref): simplified call of [`wait!`](@ref),
13+
14+
The following macros provide syntactic sugar to existing functions:
15+
16+
- [`@delay`](@ref): calls [`delay!`](@ref),
17+
- [`@run!`](@ref): calls [`run!`](@ref).
618

719
## v0.3.0
820

docs/src/index.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,9 @@ A Julia package for **discrete event generation and simulation**.
1313
- [**Troubleshooting**](troubleshooting.md): If something doesn't work as expected.
1414
- [**Version history**](history.md): A list of features and changes.
1515

16-
## Companion
17-
18-
There is a companion site [DiscreteEventsCompanion](https://pbayer.github.io/DiscreteEventsCompanion.jl/dev/) with more information, examples, notebooks and benchmarks.
19-
2016
## Development
2117

22-
`DiscreteEvents` is in active development. Please use, test and help evolve it. Its GitHub repository is at [https://github.com/pbayer/DiscreteEvents.jl](https://github.com/pbayer/DiscreteEvents.jl).
18+
`DiscreteEvents` is in development. Please use, test and help evolve it. Its GitHub repository is at [https://github.com/pbayer/DiscreteEvents.jl](https://github.com/pbayer/DiscreteEvents.jl).
2319

2420
**Author:** Paul Bayer
2521
**License:** MIT

docs/src/internals.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,6 @@ LocalClock
2727
localClock
2828
```
2929

30-
**An example on active clocks:**
31-
32-
```@repl
33-
using DiscreteEvents
34-
clk = Clock() # create a clock
35-
fork!(clk) # fork it to parallel threads
36-
clk # now you see parallel active clocks
37-
clk = PClock() # create a parallel clock structure
38-
ac2 = pclock(clk, 2) # get access to the active clock on thread 2
39-
ac2.clock # access the parallel clock 2
40-
```
41-
4230
`Schedule` and `ClockChannel` are two important `Clock` substructures:
4331

4432
```@docs

docs/src/news.md

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,10 @@
1-
# News in v0.3.1
1+
# News in v0.3.5
22

33
```@meta
44
CurrentModule = DiscreteEvents
55
```
66

7-
A few days after the release of v0.3.0 Hector Perez contributed some macros to make the `DiscreteEvents` API more Julian for common cases:
8-
9-
- [`@event`](@ref): wraps [`fun`](@ref) and [`event!`](@ref) into one call,
10-
- [`@periodic`](@ref): wraps [`fun`](@ref) and [`periodic!`](@ref) into one call,
11-
- [`@process`](@ref): wraps [`Prc`](@ref) and [`process!`](@ref) into one call,
12-
- [`@wait`](@ref): simplified call of [`wait!`](@ref),
13-
14-
The following macros provide syntactic sugar to existing functions:
15-
16-
- [`@delay`](@ref): calls [`delay!`](@ref),
17-
- [`@run!`](@ref): calls [`run!`](@ref).
7+
- multithreading (parallel clocks) has been removed from exports, testing and documentation as it was unstable and has been broken by Julia 1.7 and 1.8
188

199
## Earlier releases
2010

docs/src/old/clocks-parallel.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
## Parallel Clocks (Experimental)
2+
3+
Parallel clocks are a new feature in v0.3 and cannot yet considered to be stable. Please develop your applications first single-threaded before going parallel. Please report any failures.
4+
5+
Parallel clocks are virtual clocks with local clocks on parallel threads to support multi-threaded simulations.
6+
7+
A parallel clock structure consists of a master (global) clock on thread 1 and [`ActiveClock`](@ref)s on all available threads > 1. An active clock is a task running a thread local clock. The thread local clock can schedule and execute events locally.
8+
9+
The master clock communicates with its parallel active clocks via message channels. It synchronizes time with the local clocks. Tasks (processes and actors) have access to their thread local clock from it and then work only with the local clock.
10+
11+
```@docs
12+
PClock
13+
pclock
14+
```
15+
16+
Parallel clocks can be identified by their thread number: the master clock works on thread 1, local clocks on parallel threads ≥ 2. They can be setup and accessed easily:
17+
18+
```@repl clocks
19+
@show x=nthreads()-1;
20+
clk = PClock() # now the clock has (+x) active parallel clocks
21+
ac2 = pclock(clk, 2) # access the active clock on thread 2
22+
ac2.clock # the thread local clock
23+
ac2.clock.ac[] # local clocks can access their active clock
24+
```
25+
26+
Tasks on parallel threads have access to the thread local clock by `pclock(clk)`. Then they can schedule events, `delay!` or `wait!` on it as usual. The thread local clock is passed to a `process!` automatically if you set it up on a parallel thread.
27+
28+
You can fork explicitly existing clocks to other threads or collapse them if no longer needed. You can get direct access to parallel active clocks and diagnose them.
29+
30+
```@docs
31+
fork!
32+
collapse!
33+
```
34+
35+
```@repl clocks
36+
clk = Clock() # create a clock
37+
fork!(clk) # fork it
38+
clk # it now has parallel clocks
39+
collapse!(clk) # collapse it
40+
clk # it now has no parallel clocks
41+
```
42+
43+
```@docs
44+
diagnose
45+
```

0 commit comments

Comments
 (0)