Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
libzmq
Commits
32a1ef85
Commit
32a1ef85
authored
May 02, 2016
by
Luca Boccassi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Problem: zmq_timers* are not yet stable APIs
Solution: mark them as DRAFT APIs
parent
73896808
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
22 deletions
+40
-22
Makefile.am
Makefile.am
+5
-5
zmq.h
include/zmq.h
+17
-16
precompiled.hpp
src/precompiled.hpp
+17
-0
CMakeLists.txt
tests/CMakeLists.txt
+1
-1
No files found.
Makefile.am
View file @
32a1ef85
...
...
@@ -394,7 +394,6 @@ test_apps = \
tests/test_sockopt_hwm
\
tests/test_heartbeats
\
tests/test_stream_exceeds_buffer
\
tests/test_timers
\
tests/test_radio_dish
\
tests/test_udp
\
tests/test_scatter_gather
\
...
...
@@ -597,9 +596,6 @@ tests_test_heartbeats_LDADD = src/libzmq.la
tests_test_stream_exceeds_buffer_SOURCES
=
tests/test_stream_exceeds_buffer.cpp
tests_test_stream_exceeds_buffer_LDADD
=
src/libzmq.la
tests_test_timers_SOURCES
=
tests/test_timers.cpp
tests_test_timers_LDADD
=
src/libzmq.la
tests_test_radio_dish_SOURCES
=
tests/test_radio_dish.cpp
tests_test_radio_dish_LDADD
=
src/libzmq.la
...
...
@@ -731,7 +727,8 @@ endif
if
ENABLE_DRAFTS
test_apps
+=
tests/test_poller
\
tests/test_client_server
\
tests/test_thread_safe
tests/test_thread_safe
\
tests/test_timers
tests_test_poller_SOURCES
=
tests/test_poller.cpp
tests_test_poller_LDADD
=
src/libzmq.la
...
...
@@ -741,6 +738,9 @@ tests_test_client_server_LDADD = src/libzmq.la
tests_test_thread_safe_SOURCES
=
tests/test_thread_safe.cpp
tests_test_thread_safe_LDADD
=
src/libzmq.la
tests_test_timers_SOURCES
=
tests/test_timers.cpp
tests_test_timers_LDADD
=
src/libzmq.la
endif
check_PROGRAMS
=
${
test_apps
}
...
...
include/zmq.h
View file @
32a1ef85
...
...
@@ -437,22 +437,6 @@ typedef struct zmq_pollitem_t
ZMQ_EXPORT
int
zmq_poll
(
zmq_pollitem_t
*
items
,
int
nitems
,
long
timeout
);
/******************************************************************************/
/******************************************************************************/
#define ZMQ_HAVE_TIMERS
typedef
void
(
zmq_timer_fn
)(
int
timer_id
,
void
*
arg
);
ZMQ_EXPORT
void
*
zmq_timers_new
(
void
);
ZMQ_EXPORT
int
zmq_timers_destroy
(
void
**
timers_p
);
ZMQ_EXPORT
int
zmq_timers_add
(
void
*
timers
,
size_t
interval
,
zmq_timer_fn
handler
,
void
*
arg
);
ZMQ_EXPORT
int
zmq_timers_cancel
(
void
*
timers
,
int
timer_id
);
ZMQ_EXPORT
int
zmq_timers_set_interval
(
void
*
timers
,
int
timer_id
,
size_t
interval
);
ZMQ_EXPORT
int
zmq_timers_reset
(
void
*
timers
,
int
timer_id
);
ZMQ_EXPORT
long
zmq_timers_timeout
(
void
*
timers
);
ZMQ_EXPORT
int
zmq_timers_execute
(
void
*
timers
);
/******************************************************************************/
/* Message proxying */
/******************************************************************************/
...
...
@@ -583,6 +567,23 @@ ZMQ_EXPORT int zmq_poller_modify_fd (void *poller, int fd, short events);
ZMQ_EXPORT
int
zmq_poller_remove_fd
(
void
*
poller
,
int
fd
);
#endif
/******************************************************************************/
/* Scheduling timers */
/******************************************************************************/
#define ZMQ_HAVE_TIMERS
typedef
void
(
zmq_timer_fn
)(
int
timer_id
,
void
*
arg
);
ZMQ_EXPORT
void
*
zmq_timers_new
(
void
);
ZMQ_EXPORT
int
zmq_timers_destroy
(
void
**
timers_p
);
ZMQ_EXPORT
int
zmq_timers_add
(
void
*
timers
,
size_t
interval
,
zmq_timer_fn
handler
,
void
*
arg
);
ZMQ_EXPORT
int
zmq_timers_cancel
(
void
*
timers
,
int
timer_id
);
ZMQ_EXPORT
int
zmq_timers_set_interval
(
void
*
timers
,
int
timer_id
,
size_t
interval
);
ZMQ_EXPORT
int
zmq_timers_reset
(
void
*
timers
,
int
timer_id
);
ZMQ_EXPORT
long
zmq_timers_timeout
(
void
*
timers
);
ZMQ_EXPORT
int
zmq_timers_execute
(
void
*
timers
);
#endif // ZMQ_BUILD_DRAFT_API
...
...
src/precompiled.hpp
View file @
32a1ef85
...
...
@@ -195,6 +195,23 @@ int zmq_poller_modify_fd (void *poller, int fd, short events);
int
zmq_poller_remove_fd
(
void
*
poller
,
int
fd
);
#endif
/******************************************************************************/
/* Scheduling timers */
/******************************************************************************/
#define ZMQ_HAVE_TIMERS
typedef
void
(
zmq_timer_fn
)(
int
timer_id
,
void
*
arg
);
void
*
zmq_timers_new
(
void
);
int
zmq_timers_destroy
(
void
**
timers_p
);
int
zmq_timers_add
(
void
*
timers
,
size_t
interval
,
zmq_timer_fn
handler
,
void
*
arg
);
int
zmq_timers_cancel
(
void
*
timers
,
int
timer_id
);
int
zmq_timers_set_interval
(
void
*
timers
,
int
timer_id
,
size_t
interval
);
int
zmq_timers_reset
(
void
*
timers
,
int
timer_id
);
long
zmq_timers_timeout
(
void
*
timers
);
int
zmq_timers_execute
(
void
*
timers
);
#endif // ZMQ_BUILD_DRAFT_API
#endif //ifndef __ZMQ_PRECOMPILED_HPP_INCLUDED__
tests/CMakeLists.txt
View file @
32a1ef85
...
...
@@ -64,7 +64,6 @@ set(tests
test_stream_timeout
test_xpub_manual
test_xpub_welcome_msg
test_timers
test_radio_dish
test_udp
test_scatter_gather
...
...
@@ -120,6 +119,7 @@ IF (ENABLE_DRAFTS)
test_poller
test_thread_safe
test_client_server
test_timers
)
ENDIF
(
ENABLE_DRAFTS
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment