Questions tagged [fifo]

Any structure in which the First object In is the First object Out. Synonyms include queue, and pipe.

Any structure in which the First object In is the First object Out.

See:

1105 questions
21
votes
2 answers

How to read named FIFO non-blockingly?

I create a FIFO, and periodically open it in read-only and non-blockingly mode from a.py: os.mkfifo(cs_cmd_fifo_file, 0777) io = os.open(fifo, os.O_RDONLY | os.O_NONBLOCK) buffer = os.read(io, BUFFER_SIZE) From b.py, open the fifo for writing: out…
chaonin
  • 227
  • 1
  • 2
  • 6
20
votes
4 answers

Prevent FIFO from closing / reuse closed FIFO

Consider the following scenario: a FIFO named test is created. In one terminal window (A) I run cat test. It is now possible to write in window B and get the output in window A. It is also possible to terminate the…
Shump
  • 454
  • 1
  • 4
  • 11
19
votes
2 answers

FIFO Map with limited elements

I need a HashMap or simpy a Map with a fixed number of elements (n) working like a FIFO queue. So until the element number is <= n new elements are simply put in the map. For element number > n the first inserted element is removed and the newest is…
davioooh
  • 23,742
  • 39
  • 159
  • 250
18
votes
2 answers

FIFO behavior for Array.pop in javascript?

I want an Array method similar to Array.pop() that exhibits First In First Out behavior, instead of the native FILO behavior. Is there an easy way to do so? Imagine a javascript console: >> array = []; >> array.push(1); >> array.push(2); >>…
cinead
  • 317
  • 1
  • 2
  • 8
17
votes
1 answer

AWS SQS FIFO Queue: The queue should either have ContentBasedDeduplication enabled or MessageDeduplicationId provided explicitly?

When I try to add a message to my FIFO SQS using AWS CLI I get: An error occurred (InvalidParameterValue) when calling the SendMessage operation: The queue should either have ContentBasedDeduplication enabled or MessageDeduplicationId provided…
java12399900
  • 1,485
  • 7
  • 26
  • 56
17
votes
3 answers

NSOperationQueue serial FIFO queue

Is it possible to use an NSoperationQueue object as a serial FIFO queue by setting its maxConcurrentOperationCount to 1? I note that the docs state... For a queue whose maximum number of concurrent operations is set to 1, this equates to a serial…
Barjavel
  • 1,626
  • 3
  • 19
  • 31
17
votes
3 answers

Adding opencv processing to gstreamer application

I'm trying to do the following: receive video stream using gstreamer and process it with opencv. I've found few solutions, and one of them is to write video into (from gstreamer) fifo and then read it using opencv. (OPTION3 here MJPEG streaming and…
Roman
  • 1,396
  • 4
  • 15
  • 39
16
votes
3 answers

Is there a FIFO stream in Scala?

I'm looking for a FIFO stream in Scala, i.e., something that provides the functionality of immutable.Stream (a stream that can be finite and memorizes the elements that have already been read) mutable.Queue (which allows for added elements to the…
Stefan Endrullis
  • 4,150
  • 2
  • 32
  • 45
16
votes
4 answers

Reading a file in real-time using Node.js

I need to work out the best way to read data that is being written to a file, using node.js, in real time. Trouble is, Node is a fast moving ship which makes finding the best method for addressing a problem difficult. What I Want To Do I have a java…
Oliver Lloyd
  • 4,936
  • 7
  • 33
  • 55
14
votes
1 answer

Is it possible to upload a file with cURL from a pipe?

I mean POSTing a standard file upload form. Usual command line contains this switch in this case: -F "Filedata=@filename.zip" However when I try to feed a named pipe made by linux command "mkfifo", eg. "mkfifo filename.zip", I always get an error…
Konstantin
  • 2,983
  • 3
  • 33
  • 55
14
votes
3 answers

Write and read from a fifo from two different script

I have two bash script. One script write in a fifo. The second one read from the fifo, but AFTER the first one end to write. But something does not work. I do not understand where the problem is. Here the code. The first script is (the…
Simone
  • 2,304
  • 6
  • 30
  • 79
14
votes
3 answers

FIFO cache vs LRU cache

I'm really sorry for such simple question. I just want to be sure that I understand FIFO cache model correctly and I hope that someone will help me with that :) LRU cache deletes entry that was accessed least recently if the cache is full. FIFO…
Andrey Yaskulsky
  • 2,458
  • 9
  • 39
  • 81
14
votes
3 answers

FIFO pipe is always readable in select()

In C pseudo-code: while (1) { fifo = open("fifo", O_RDONLY | O_NONBLOCK); fd_set read; FD_SET(fifo, &read); select(nfds, &read, NULL, NULL, NULL); } The process sleeps as triggered by select() until another process writes into fifo.…
Matoe
  • 2,742
  • 6
  • 33
  • 52
13
votes
7 answers

How implementation of java.util.queue uses LIFO?

In Java doc: [...] Among the exceptions are priority queues, which order elements according to a supplied comparator, or the elements' natural ordering, and LIFO queues (or stacks) which order the elements LIFO (last-in-first-out) How…
celsowm
  • 846
  • 9
  • 34
  • 59
13
votes
4 answers

LinkedHashMap LIFO or FIFO?

Is LinkedHashMap LIFO or FIFO in nature? If my map is of the form: map.put(1,"one"); map.put(2,"two"); what would be the order if I was to iterate on the map using keyset?? EDIT: I think I did actually confuse two different concepts. Let me…
BlahBlah
  • 275
  • 1
  • 5
  • 15
1
2
3
73 74