|
by: DanGo |
last post by:
Hi All,
I'm trying to get my head around synchronization.
Documentation seems to say that creating a volatile field gives a
memorybarrier.
Great! But when I do a little performance testing Thread.MemoryBarrier is
40 times slower than accessing a volatile int. Also I don't see any
significant difference between the time to increment a volatile int and a
|
by: Timo |
last post by:
I'm trying to make a thread safe object cache without locking.
The objects are cached by the id of the data dict given in __new__.
Objects are removed from the cache as soon as they are no longer
referenced. The type of the data must be a Python dict (comes from an
external source).
Here's what I've got so far:
import time
|
by: hugo27 |
last post by:
hugo 27, Oct 9, 2004
Ref Docs: c.l.c FAQ article 12.26 .
www.digitalmars.com sitemap.stdio.fflush
Reading these Docs I understand that fflush does not
summarily destroy or discard the flushed data.
But it is not clear, in the case of fflush(stdin),
where stdin is default C keyboard buffer, what
actually becomes of the data.
|
by: Michi Henning |
last post by:
Hi, I can't find a statement about this in the threading
sections in the doc...
Consider:
class Class1
{
Class1()
{
_val = 42;
|
by: JoKur |
last post by:
Hello,
First let me tell you that I'm very new to C# and learning as I go. I'm
trying to write a client application to communicate with a server (that I
didn't write). Each message from the server is on one line (\r\n at end) and
is formed as - each of
which is seperated by a space. Arguments with spaces in them are enclosed in
quotations.
So, I'm able to open a connection to the server. When I send a message to
|
|
by: collection60 |
last post by:
Hi people,
I am writing a library that will implement a binary file format.
Well... I'm thinking, as a design, it would be nice to have my library
able to promise to not use more than a certain amount of RAM. I could
have a "SetCacheSize(long NewSize);" function. So as part of that
promise, when required memory exceeds that limit, the extra data is
saved to disk and flushed from RAM.
|
by: MindClass |
last post by:
I've to modifying a file, then I use a method imported that access to
that file and has to read the new data, but they are not read ( as if
the data were not flushed at the moment even using .close()
explicitly).
---------------------------------------
...
...
# If it is not installed, it looking for the line and insert it.
if not is_application:
|
by: lwhitb1 |
last post by:
Does anyone have any input on setting up my CAB application so that the
application is thread safe, and cached appropiately? I read that this
can be managed through Services, and dynamic injection. On the
contrary, I was told that this can be handled using Enterprise Library
cached application block. Last, but not least, i read you can implement
this at the class level, creating immutable classes, and caching them
accordingly. Any...
|
by: NvrBst |
last post by:
I've read a bit online seeing that two writes are not safe, which I
understand, but would 1 thread push()'ing and 1 thread pop()'ing be
thread-safe? Basically my situation is the follows:
--Thread 1--
1. Reads TCPIP Buffer
2. Adds Buffer to Queue (q.size() to check queue isn't full, and
q.push_back(...))
3. Signals Reading Thread Event & Goes Back to Wait for More Messages
on TCPIP
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
|