Skip to content

Commit

Permalink
Merge pull request #3 from atilaneves/update
Browse files Browse the repository at this point in the history
Update
  • Loading branch information
atilaneves committed Jul 29, 2022
2 parents 9111fcb + 0ceba79 commit 03a8c29
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 9 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: CI
on: [push, pull_request]

jobs:
test:
name: Dub Test
strategy:
matrix:
os: [ubuntu-20.04, windows-2019, macos-10.15]
dc: [dmd-2.100.0, ldc-1.29.0]

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2

- name: Install D compiler
uses: dlang-community/[email protected]
with:
compiler: ${{ matrix.dc }}

- name: Test
run: dub test -q --build=unittest-cov

- name: Build binary
run: dub build -q

- uses: codecov/codecov-action@v2
3 changes: 1 addition & 2 deletions dub.sdl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description "Safe concurrency for D"
authors "Atila Neves"
copyright "Copyright © 2018, Atila Neves"
license "boost"
dflags "-dip25" "-dip1000"
dflags "-preview=dip25" "-preview=dip1000"


configuration "default" {
Expand All @@ -29,5 +29,4 @@ configuration "unittest" {
dependency "unit-threaded" version="*"
dependency "automem" version="*"
dependency "test_allocator" version="*"
dependency "stdx-allocator" version="~>2.77.0"
}
7 changes: 3 additions & 4 deletions dub.selections.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{
"fileVersion": 1,
"versions": {
"automem": "0.4.4",
"stdx-allocator": "2.77.5",
"test_allocator": "0.2.5",
"unit-threaded": "0.7.53"
"automem": "0.6.7",
"test_allocator": "0.3.3",
"unit-threaded": "2.0.5"
}
}
2 changes: 1 addition & 1 deletion examples/example.d
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ void main() @safe {

{
int* oldIntPtr; // only here to demostrate scopes, see below
auto xfoo = foo.lock(); // get exclusive access to the data (this locks a mutex)
scope xfoo = foo.lock(); // get exclusive access to the data (this locks a mutex)

safeWriteln("i: ", xfoo.i);
xfoo.i = 1;
Expand Down
2 changes: 1 addition & 1 deletion source/fearless/sharing.d
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ package struct ExclusiveImpl(T) {
The constructor is responsible for initialising the payload so that
it's not possible to escape it.
*/
private this(A...)(auto ref A args) shared {
this(A...)(auto ref A args) shared {
import std.functional: forward;
this._payload = T(forward!args);
init();
Expand Down
2 changes: 1 addition & 1 deletion tests/ut/exclusive.d
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ import unit_threaded;
@("RC exclusive struct mallocator")
@system unittest {

import stdx.allocator.mallocator: Mallocator;
import std.experimental.allocator.mallocator: Mallocator;

static struct Foo {
int i;
Expand Down

0 comments on commit 03a8c29

Please sign in to comment.