#pragma once
#include <stdint.h>

struct _yrtag_SRSWQ;
typedef struct _yrtag_SRSWQ yrSRSWQ;

yrSRSWQ*	yrSRSWQ_create(size_t capacity);
void		yrSRSWQ_destroy(yrSRSWQ* q);

void*	yrSRSWQ_read(yrSRSWQ* q);//returns NULL if queue empty
void	yrSRSWQ_write_block(yrSRSWQ* q, void* item);//blocks if queue full
int		yrSRSWQ_write(yrSRSWQ* q, void* item);//returns 0 if queue full
int		yrSRSWQ_isfull(yrSRSWQ* q);
float	yrSRSWQ_getload(yrSRSWQ* q);