473,461 Members | 1,518 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

twisted - locking threads when deferToThread is used

Hi,
I'm writing an application which will be periodically testing servers.
I will have a global list of these servers(domain names) and need to do
few tasks.
1) DNS checks - I will use asynchronous twisted-names for it
- in case there is a difference comparing to the list it should update
the list(then also in DB)
2) ICMP pings - should be also possible to do it asynchronously
3) Blocking function which will be pinging with SIP requests
- here I will use function deferToThread to make it non-blocking.

Questions:
1) How do I lock each thread when writing to a global list in twisted?
2) How will I put together all three results mentioned above in the
global list
- is it by using function callLater ?
3) Could you help me with a rough skeleton of this application, please?

Thank you,
Lada
Aug 8 '07 #1
0 1499

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Vinay Aggarwal | last post by:
I have been thinking about the lazy initialization and double checked locking problem. This problem is explain in detail here http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html...
1
by: Diez B. Roggisch | last post by:
Hi, I have a simple client-server app, that sits on a serial port and communicates through that with an attached microcontroller-board. To the outside, it exposes two sockets (file or inet)...
2
by: Daniel Bickett | last post by:
Hello, I am writing an application using two event-driven libraries: wxPython, and twisted. The first problem I encountered in the program is the confliction between the two all-consuming...
2
by: Christopher Subich | last post by:
I'm building an application that makes several user-specified internet connections; twisted meets my needs more or less perfectly. I'm running into a problem, however, in that twisted is not...
3
by: Chris Tanger | last post by:
I am creating a class that has a method "Write" that I wish to make threadsafe. The method must block calling threads until the task performed in write is complete. Only 1 thread at a time can...
2
by: GregM | last post by:
Hi First off I'm not using anything from Twisted. I just liked the subject line :) The folks of this list have been most helpful before and I'm hoping that you'll take pity on a the dazed and...
3
by: Morten Wennevik | last post by:
Hi, I have a MDIChild with static properties that can be updated at any time by the MDIParent. These properties may also at unknown times be accessed by one or more worker threads. Now, I'm...
7
by: Shak | last post by:
Hi all, I'm trying to write a thread-safe async method to send a message of the form (type)(contents). My model is as follows: private void SendMessage(int type, string message) { //lets...
6
by: looping | last post by:
Hi, Probably not the best group to post my question but I'm sure there is some people here that use Twisted. First here is the beginning of my source code: from twisted.internet import reactor,...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.