close() method doesn't work properly

Supporting 2.7 and 3.2+
Post Reply
bhaveshachhada
Fresh meat
Posts: 1
Joined: Mon Jul 12, 2021 2:59 am
Contact:

close() method doesn't work properly

Post by bhaveshachhada »

We have used, Phidget22 library in our code. We open and close connections to multiple Phidgets (Example DCMotor, CurrentInput, DigitalInput, etc.). When we iterate over the process of opening and closing connections to phidgets,the number of open file descriptors with the process increases gradually. Which at the end causes severe problems.

Code: Select all

Phidget22.Devices.DCMotor import DCMotor

def process_dc_motor():
	motor = DCMotor()
	motor.openWaitForAttachment(1000)
	<< do some task >>
	motor.close()
If we call these method multiple times, then we observed that, with each call to this method, the number of open file descriptors increased gradually.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest