Skip to content

Commit

Permalink
updates %~>% to fix #24
Browse files Browse the repository at this point in the history
  • Loading branch information
shikokuchuo committed Nov 29, 2023
1 parent 4f277f2 commit bb36709
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: nanonext
Type: Package
Title: NNG (Nanomsg Next Gen) Lightweight Messaging Library
Version: 0.10.4.9021
Version: 0.10.4.9022
Description: R binding for NNG (Nanomsg Next Gen), a successor to ZeroMQ. NNG is
a socket library implementing 'Scalability Protocols', a reliable,
high-performance standard for common communications patterns including
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# nanonext 0.10.4.9021
# nanonext 0.10.4.9022

*This is a major stability release bundling the 'libnng' v1.6.0 source code.*

Expand Down
4 changes: 3 additions & 1 deletion R/sync.R
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,9 @@ unlock <- function(socket) invisible(.Call(rnng_socket_unlock, socket))
#' @details This is an experimental operator.
#'
#' The condition value of 'cv' is initially reset to zero when this operator
#' returns.
#' returns. Only one forwarder can be active on a 'cv' at any given time,
#' and assigning a new forwarding target cancels any currently existing
#' forwarding.
#'
#' Changes in the condition value of 'cv' are forwarded to 'cv2', but only
#' on each occassion 'cv' is signalled. This means that waiting on 'cv'
Expand Down
4 changes: 3 additions & 1 deletion man/grapes-twiddle-greater-than-grapes.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions src/thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,12 @@ SEXP rnng_signal_thread_create(SEXP cv, SEXP cv2) {
if (R_ExternalPtrTag(cv2) != nano_CvSymbol)
Rf_error("'cv2' is not a valid Condition Variable");

SEXP existing = Rf_getAttrib(cv, nano_CvSymbol);
if (existing != R_NilValue) {
thread_duo_finalizer(existing);
R_ClearExternalPtr(existing);
}

nano_thread_duo *duo = R_Calloc(1, nano_thread_duo);
nano_cv *ncv = (nano_cv *) R_ExternalPtrAddr(cv);
nano_cv *ncv2 = (nano_cv *) R_ExternalPtrAddr(cv2);
Expand Down

0 comments on commit bb36709

Please sign in to comment.