Page 1 of 1

close() method doesn't work properly

Posted: Mon Jul 12, 2021 3:06 am
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.