Skip to content

Commit

Permalink
cleanup internal functions (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
shikokuchuo authored Dec 30, 2024
1 parent 4814abd commit 57df449
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 484 deletions.
2 changes: 0 additions & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,9 @@ export("%~>%")
export("opt<-")
export(.advance)
export(.context)
export(.dispatcher)
export(.interrupt)
export(.keep)
export(.mark)
export(.online)
export(.unresolved)
export(call_aio)
export(call_aio_)
Expand Down
32 changes: 0 additions & 32 deletions R/sync.R
Original file line number Diff line number Diff line change
Expand Up @@ -303,35 +303,3 @@ unlock <- function(socket) invisible(.Call(rnng_socket_unlock, socket))
#' @export
#'
`%~>%` <- function(cv, cv2) invisible(.Call(rnng_signal_thread_create, cv, cv2))

#' Dispatcher Socket
#'
#' Creates a Dispatcher socket, which is a special type of \sQuote{req} socket,
#' with FIFO scheduling using a threaded implementation. Internal package
#' function.
#'
#' @param host \sQuote{inproc://} url connecting the host to the thread.
#' @param url the URLs at which to listen for rep nodes.
#' @inheritParams listen
#'
#' @return A \sQuote{req} Socket. The thread is attached as an attribute.
#'
#' @keywords internal
#' @export
#'
.dispatcher <- function(host, url, tls = NULL)
.Call(rnng_dispatcher_socket, host, url, tls)

#' Read Online Status
#'
#' Reads the online status of threaded dispatcher sockets. Internal package
#' function.
#'
#' @param sock a dispatcher Socket.
#'
#' @return An vector of integer values.
#'
#' @keywords internal
#' @export
#'
.online <- function(sock) .Call(rnng_read_online, sock)
25 changes: 0 additions & 25 deletions man/dot-dispatcher.Rd

This file was deleted.

19 changes: 0 additions & 19 deletions man/dot-online.Rd

This file was deleted.

2 changes: 0 additions & 2 deletions src/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ static const R_CallMethodDef callMethods[] = {
{"rnng_dial", (DL_FUNC) &rnng_dial, 5},
{"rnng_dialer_close", (DL_FUNC) &rnng_dialer_close, 1},
{"rnng_dialer_start", (DL_FUNC) &rnng_dialer_start, 2},
{"rnng_dispatcher_socket", (DL_FUNC) &rnng_dispatcher_socket, 3},
{"rnng_eval_safe", (DL_FUNC) &rnng_eval_safe, 1},
{"rnng_fini", (DL_FUNC) &rnng_fini, 0},
{"rnng_get_opt", (DL_FUNC) &rnng_get_opt, 2},
Expand All @@ -170,7 +169,6 @@ static const R_CallMethodDef callMethods[] = {
{"rnng_pipe_notify", (DL_FUNC) &rnng_pipe_notify, 6},
{"rnng_protocol_open", (DL_FUNC) &rnng_protocol_open, 6},
{"rnng_random", (DL_FUNC) &rnng_random, 2},
{"rnng_read_online", (DL_FUNC) &rnng_read_online, 1},
{"rnng_reap", (DL_FUNC) &rnng_reap, 1},
{"rnng_recv", (DL_FUNC) &rnng_recv, 4},
{"rnng_recv_aio", (DL_FUNC) &rnng_recv_aio, 6},
Expand Down
16 changes: 0 additions & 16 deletions src/nanonext.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,20 +212,6 @@ typedef struct nano_thread_duo_s {
nano_cv *cv2;
} nano_thread_duo;

typedef struct nano_thread_disp_s {
nng_thread *thr;
nano_cv *cv;
nng_tls_config *tls;
nano_saio **saio;
nano_aio **raio;
nano_aio **haio;
nng_url *up;
const char *host;
char **url;
int *online;
R_xlen_t n;
} nano_thread_disp;

typedef struct nano_signal_s {
nano_cv *cv;
int *online;
Expand Down Expand Up @@ -333,7 +319,6 @@ SEXP rnng_cv_wait_safe(SEXP);
SEXP rnng_dial(SEXP, SEXP, SEXP, SEXP, SEXP);
SEXP rnng_dialer_close(SEXP);
SEXP rnng_dialer_start(SEXP, SEXP);
SEXP rnng_dispatcher_socket(SEXP, SEXP, SEXP);
SEXP rnng_eval_safe(SEXP);
SEXP rnng_fini(void);
SEXP rnng_get_opt(SEXP, SEXP);
Expand All @@ -355,7 +340,6 @@ SEXP rnng_ncurl_transact(SEXP);
SEXP rnng_pipe_notify(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
SEXP rnng_protocol_open(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
SEXP rnng_random(SEXP, SEXP);
SEXP rnng_read_online(SEXP);
SEXP rnng_reap(SEXP);
SEXP rnng_recv(SEXP, SEXP, SEXP, SEXP);
SEXP rnng_recv_aio(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
Expand Down
Loading

0 comments on commit 57df449

Please sign in to comment.