real-time

What is the absolute fastest way to implement a concurrent queue with ONLY one consumer and one producer?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-23 21:55:53
问题 java.util.concurrent.ConcurrentLinkedQueue comes to mind, but is it really optimum for this two-thread scenario? I am looking for the minimum latency possible on both sides (producer and consumer). If the queue is empty you can immediately return null AND if the queue is full you can immediately discard the entry you are offering. Does ConcurrentLinkedQueue use super fast and light locks (AtomicBoolean) ? Has anyone benchmarked ConcurrentLinkedQueue or knows about the ultimate fastest way of

How to add real-time data in a dual-Y-axis ZedGraph graph using C#?

两盒软妹~` 提交于 2019-12-23 18:20:33
问题 For my project, I need to add and update real-time data to my dual y-axis graph. The Y and Y2 values share the same X value, and I created it already. Now I have a function that adds the new point pairs to the curve lists. Here is my problem: My Y and Y2 values are always added to the curve list of the first curve. How can I get the Y2 value added to the second curve list in my graph? Here is my function code: private void AddDataToGraph(ZedGraphControl zg1, XDate xValue, double yValue1,

How to convert a Ada.Real_TIme.Time to a string?

痴心易碎 提交于 2019-12-23 18:14:58
问题 I would like to write a Ada.Real_Time.Time in a file, How can I do that? Thanks 回答1: Package Ada.Real_time doesn't provide a method for the direct format. I'd advise you to look at Ada.Calendar.Formatting. You have a method Clock like in Ada.Real_time. Indeed, there is a method Image(parameters : Time), which returns a String. For more details : Package: Ada.Calendar.Formatting 回答2: You can use Ada.Real_Time.Split to convert an Ada.Real_Time.Time into (a) the number of seconds since the epoch

Realtime solution for Django?

狂风中的少年 提交于 2019-12-23 17:25:54
问题 A few months ago I was able to use Orbited and Stomp with Django to create a simple realtime application. The Orbited project seems to be dead now (or in a state of flux?) as orbited.org is down. What is a good current solution for creating realtime applications with Django? Thanks. 回答1: Very late, but short answer: It does appear like Orbited is dead. However, you can still use it for Django (I have, recently). There are other options, like APE, but getting that to work with Django is not

Is compaction really inevitable for all JVM GC implementations?

痞子三分冷 提交于 2019-12-23 15:27:10
问题 On this link it is said that: These pauses are the result of an inevitable requirement to compact the heap to free up space. Collectors use different strategies to delay these events, but compaction is inevitable for all commercial available collectors. I was under the impression that if you keep the memory footprint of your application constant then there is no need for GC compaction to occur, in other words, it will only happen if you keep adding and collecting objects. If you have a big

using XMPP or WebSocket, why there is a server needed in real-time communication between users?

倾然丶 夕夏残阳落幕 提交于 2019-12-23 12:53:46
问题 At the bottom, it's all about socket communications. If there is some way to get the ip of the both users, why can't the connection be directly setup between the users instead of having to go thru a server in the middle? 回答1: My 2 cents: No one out there forces us to have a server based real-time communication model. Infact XMPP have an extension called "Serverless Messaging" which defines how to communicate over local or wide-area networks using the principles of zero-configuration

MatPlotLib's ion() and draw() not working

浪尽此生 提交于 2019-12-23 10:56:27
问题 I am trying to plot figures in real time using a for loop. I have the following simple code: import matplotlib.pyplot as plt plt.ion() plt.figure() for i in range(100): plt.plot([i], [i], 'o') plt.draw() plt.pause(0.0001) This code does not show the figure until it has finished computing, which I don't want. I want it to draw the figure after every loop. If I replace plt.draw() with plt.show , multiple figures are output in real time, but I want them all to appear in the same figure. Any

How to Properly Use Realtime Priority

懵懂的女人 提交于 2019-12-23 10:15:31
问题 My question may not really be about realtime processing, but then again, it may be. My application has several threads that are far more important than the GUI, BUT, I do want the GUI to at least be usable. I don't want it locked at all times, and I do want to update the screen given results of processing I am performing. Currently all my essential items are isolated in separate threads, and I call a delegate to my GUI to display results. My GUI works, but if I change tabs, or minimize

Understanding min_tag_id and max_tag_id

[亡魂溺海] 提交于 2019-12-23 07:20:11
问题 tag_media_recent takes as max_id and min_id as parameters. The documentation says : MIN_ID Return media before this min_id. MAX_ID Return media after this max_id. I tried max_id = 3390883111979 (very large than what is currently used) It returns the newest tagged images. Doesn't it follow the definition of min_id? seems erraneous I also tried min_id = 1390922265529 and max_id = 1390922265528 . It returns 12 images. How is that possible when the max range given is 3? I also tried reversing the

What does it mean when one language is a parallel superset of another?

岁酱吖の 提交于 2019-12-23 07:15:18
问题 I'm reading a journal article about Real-Time Concurrent C, and it mentions in the abstract (so any of you can see the context through that link as well) that "Concurrent C, is a parallel superset of C (and of C++)". Now I know what a superset is, but what do they mean by a "parallel superset" when referring to programming languages? 回答1: They're claiming two things, not one thing that is "modified". It's like saying "a quick red car"; the car is quick and red, it's not having a fast color.