Skip to content

Commit 96202d1

Browse files
committed
Add a mutex lock/unlock inside every public API function.
1 parent bd7b7fa commit 96202d1

File tree

6 files changed

+383
-196
lines changed

6 files changed

+383
-196
lines changed

.cirrus.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
cirrus-ci_task:
33
container:
4-
image: l.gcr.io/google/bazel:2.1.0
4+
image: l.gcr.io/google/bazel:2.2.0
55
cpu: 8
66
memory: 12G
77
configure_script:

.travis/bazel-linux

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ set -eu
66

77
travis_install() {
88
# Get bazel.
9-
wget https://github.com/bazelbuild/bazel/releases/download/2.1.1/bazel-2.1.1-installer-linux-x86_64.sh
10-
chmod +x bazel-2.1.1-installer-linux-x86_64.sh
11-
./bazel-2.1.1-installer-linux-x86_64.sh --user
9+
wget https://github.com/bazelbuild/bazel/releases/download/2.2.0/bazel-2.2.0-installer-linux-x86_64.sh
10+
chmod +x bazel-2.2.0-installer-linux-x86_64.sh
11+
./bazel-2.2.0-installer-linux-x86_64.sh --user
1212
echo 'build --jobs=4 --curses=no --verbose_failures' >> $HOME/.bazelrc
1313
echo 'build --config=linux' >> $HOME/.bazelrc
1414
echo "build --config=$CC" >> $HOME/.bazelrc

toxcore/tox.api.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,21 @@ static class options {
623623
*/
624624
any user_data;
625625
}
626+
627+
/**
628+
* These options are experimental, so avoid writing code that depends on
629+
* them. Options marked "experimental" may change their behaviour or go away
630+
* entirely in the future, or may be renamed to something non-experimental
631+
* if they become part of the supported API.
632+
*/
633+
namespace experimental {
634+
/**
635+
* Make public API functions thread-safe using a per-instance lock.
636+
*
637+
* Default: false.
638+
*/
639+
bool thread_safety;
640+
}
626641
}
627642

628643

0 commit comments

Comments
 (0)