Commit fc398fb2 authored by Greg Williams's avatar Greg Williams
Browse files

Merged in documentation, threadpool tuning and release notes changes to prepare for 0.10.0 release

parents 0b572001 7d5a3c16
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -92,6 +92,8 @@ Operations
Kinetic C Client I/O Examples
=============================

* [`put_nonblocking`](src/examples/put_nonblocking.c) - Single thread, single connection, nonblocking put operation.
* [`get_nonblocking`](src/examples/get_nonblocking.c) - Single thread, single connection, nonblocking get operation.
* [`write_file_blocking`](src/examples/write_file_blocking.c) - Single thread, single connection, blocking operation.
* [`write_file_blocking_threads`](src/examples/write_file_blocking_threads.c) - Multiple threads, single connection, blocking operations.
* [`write_file_nonblocking`](src/examples/write_file_nonblocking.c) - Single thread, single connection, multiple non-blocking operations
+8 −0
Original line number Diff line number Diff line
v0.10.0 (kinetic-protocol 3.0.5)
-------------------------------
* Added put_nonblocking and get_nonblocking examples
* Added KineticSemaphore API to provide a simpler wrapper around a common use of pthread condition variables as a thread safe way to signal when an async operation has finished
* Switched internal message infrastructure to use a threadpool. This will allow for a much higher number active connections and outstanding commands.
* KineticClient_Init now returns a KineticClient pointer (internally, it's a handle to the threadpool) that must be passed to KineticClient_CreateConnection() in order to create new connections and must also be passed to KineticClient_Shutdown() on shutdown
* Improved I/O examples to demonstrate client write operations for blocking/non-blocking (asynchrounous) and single/multi-threaded.

v0.9.2 (kinetic-protocol 3.0.5)
-------------------------------
* Added missing mutex lock causing a concurrency issue.
+25 −2
Original line number Diff line number Diff line
@@ -4,10 +4,33 @@
struct _KineticSemaphore;
typedef struct _KineticSemaphore KineticSemaphore;

/**
 * @brief Creates a KineticSemaphore. The KineticSemaphore is a simple wrapper 
 *        around a pthread condition variable and provides a a thread safe 
 *        way to block a thread and wait for notification from another thread.
 *
 * @return          Returns a pointer to a KineticSemaphore
 */
KineticSemaphore * KineticSemaphore_Create(void);
void KineticSemaphore_Lock(KineticSemaphore * sem);
void KineticSemaphore_Unlock(KineticSemaphore * sem);

/**
 * @brief Signals KineticSemaphore. This will unblock another 
 *        thread that's blocked on the given semaphore using KineticSemaphore_WaitForSignalAndDestroy()
 *        You should never signal the same KineticSemaphore more than once.
 *
 * @param sem       A pointer to the semaphore to signal
 *
 */
void KineticSemaphore_Signal(KineticSemaphore * sem);

/**
 * @brief Blocks until the given semaphore is signaled. This will not block
 *        if the Semaphore has already been signaled. 
 *        Once unblocked, this will also destroy (free) the provide KineticSemaphore.
 *
 * @param sem       A pointer to the semaphore to wait for a signal.
 *
 */
void KineticSemaphore_WaitForSignalAndDestroy(KineticSemaphore * sem);

#endif // _KINETIC_SEMAPHORE_H
+0 −2
Original line number Diff line number Diff line
@@ -136,10 +136,8 @@ static void get_finished(KineticCompletionData* kinetic_data, void* clientData)
{
    GetStatus * get_status = clientData;

    KineticSemaphore_Lock(get_status->sem);
    // Save GET result status
    get_status->status = kinetic_data->status;
    // Signal that we're done
    KineticSemaphore_Signal(get_status->sem);
    KineticSemaphore_Unlock(get_status->sem);
}
+0 −2
Original line number Diff line number Diff line
@@ -107,10 +107,8 @@ static void put_finished(KineticCompletionData* kinetic_data, void* clientData)
{
    PutStatus * put_status = clientData;

    KineticSemaphore_Lock(put_status->sem);
    // Save PUT result status
    put_status->status = kinetic_data->status;
    // Signal that we're done
    KineticSemaphore_Signal(put_status->sem);
    KineticSemaphore_Unlock(put_status->sem);
}
Loading